Noun Project · API Governance Rules
Noun Project API Rules
Spectral linting rules defining API design standards and conventions for Noun Project.
49 Rules
error 18
warn 24
info 7
Rule Categories
example
external
info
no
openapi
operation
parameter
paths
post
request
response
schema
security
servers
tag
tags
Rules
error
info-title-noun-project
API title must begin with "Noun Project".
$.info
error
info-description-required
API info description is required and must be substantive.
$.info
warn
info-description-length
API info description should be at least 100 characters.
$.info.description
error
info-version-required
API info version is required.
$.info
warn
info-contact-required
API info contact block is required.
$.info
warn
info-license-required
API info license block is required.
$.info
error
openapi-version-3
OpenAPI version must be 3.0.x or higher.
$.openapi
error
servers-required
At least one server must be defined.
$
error
servers-https-only
Servers must use HTTPS.
$.servers[*].url
warn
servers-noun-project-host
Servers should point to api.thenounproject.com.
$.servers[*].url
error
paths-v2-prefix
All paths must be under the /v2 version prefix.
$.paths
warn
paths-kebab-case
Path segments (excluding parameters) must be kebab-case.
$.paths
error
paths-no-trailing-slash
Paths must not end with a trailing slash.
$.paths
error
paths-no-query-string
Paths must not include query strings.
$.paths
error
operation-operationid-required
Each operation must declare an operationId.
$.paths[*][get,post,put,patch,delete]
warn
operation-operationid-camel-case
operationId must be camelCase.
$.paths[*][get,post,put,patch,delete].operationId
info
operation-operationid-verb-prefix
operationId should start with a recognized verb (get/list/search/add/update/delete/download/autocomplete).
$.paths[*][get,post,put,patch,delete].operationId
error
operation-summary-required
Each operation must declare a summary.
$.paths[*][get,post,put,patch,delete]
warn
operation-summary-title-case-prefix
Operation summaries should start with a capital letter.
$.paths[*][get,post,put,patch,delete].summary
error
operation-description-required
Each operation must declare a description.
$.paths[*][get,post,put,patch,delete]
error
operation-tags-required
Each operation must declare at least one tag.
$.paths[*][get,post,put,patch,delete]
warn
operation-security-required
Each operation must declare a security block (OAuth 1.0a).
$.paths[*][get,post,put,patch,delete]
warn
tags-global-defined
Global tags array must be defined.
$
warn
tag-description-required
Each global tag must have a description.
$.tags[*]
warn
tag-title-case
Tag names must be Title Case (e.g., "Icon", "Collection", "Autocomplete").
$.tags[*].name
warn
parameter-description-required
Each parameter must have a description.
$.paths[*][get,post,put,patch,delete].parameters[*]
warn
parameter-snake-case
Query and path parameter names must be snake_case.
$.paths[*][get,post,put,patch,delete].parameters[?(@.in == 'query' || @.in == 'path')].name
error
parameter-schema-required
Each parameter must declare a schema with a type.
$.paths[*][get,post,put,patch,delete].parameters[*]
info
parameter-pagination-cursor
Pagination parameters must use prev_page / next_page cursor tokens.
$.paths[*][get].parameters[?(@.in == 'query' && (@.name == 'page' || @.name == 'offset'))]
warn
parameter-thumbnail-size-enum
thumbnail_size parameter must constrain to enum [42, 84, 200].
$.paths[*][get,post,put,patch,delete].parameters[?(@.name == 'thumbnail_size')].schema
warn
request-body-json
Request bodies should use application/json content.
$.paths[*][post,put,patch].requestBody.content
info
request-body-description
Request bodies should have a description.
$.paths[*][post,put,patch].requestBody
error
response-success-required
Each operation must declare a 2xx response.
$.paths[*][get,post,put,patch,delete].responses
warn
response-401-required
Each authenticated operation must declare a 401 response.
$.paths[*][get,post,put,patch,delete].responses
warn
response-429-required
Operations subject to rate limits must declare a 429 response.
$.paths[*][get,post,put,patch,delete].responses
error
response-description-required
Each response must have a description.
$.paths[*][get,post,put,patch,delete].responses[*]
warn
response-json-content
2xx JSON responses must use application/json content type.
$.paths[*][get,post,put,patch,delete].responses[?(@property.match(/^2\\d{2}$/))].content
warn
schema-property-snake-case
Schema property names must be snake_case.
$.components.schemas[*].properties
warn
schema-description-required
Each component schema must have a description.
$.components.schemas[*]
error
schema-type-required
Each component schema must declare a type.
$.components.schemas[*]
info
schema-id-integer
id properties should be typed as integer for Noun Project resources.
$.components.schemas[*].properties.id
info
schema-permalink-uri
permalink properties should use format uri.
$.components.schemas[*].properties.permalink
warn
security-global-defined
Global security must be declared.
$
warn
security-scheme-oauth1
Security schemes must include the oauth1 scheme.
$.components.securitySchemes
warn
security-scheme-description
Each security scheme must have a description.
$.components.securitySchemes[*]
error
no-get-request-body
GET operations must not declare a request body.
$.paths[*][get]
warn
post-request-body-required
POST operations should declare a request body.
$.paths[*][post]
info
example-encouraged
Schema properties should include example values.
$.components.schemas[*].properties[*]
info
external-docs-encouraged
The spec should reference external documentation.
$