Spoonacular · API Governance Rules
Spoonacular API Rules
Spectral linting rules defining API design standards and conventions for Spoonacular.
29 Rules
error 6
warn 19
info 4
Rule Categories
info
no
openapi
operation
parameter
path
paths
query
response
schema
security
servers
tag
Rules
warn
info-title-prefix
API title should reference spoonacular.
$.info
warn
info-description-required
Info object must have a non-empty description.
$.info
error
info-version-required
Info object must declare a version.
$.info
error
openapi-version-3
Spec must be OpenAPI 3.x.
$
error
servers-defined
A servers array must be defined.
$
error
servers-https
Server URLs must use HTTPS.
$.servers[*]
warn
paths-no-trailing-slash
Paths should not end with a trailing slash.
$.paths[*]~
info
paths-camel-case
Path segments use camelCase (Spoonacular convention, e.g. /recipes/complexSearch).
$.paths[*]~
warn
operation-summary-required
Every operation must have a summary.
$.paths[*][get,post,put,delete,patch]
warn
operation-description-required
Every operation must have a description.
$.paths[*][get,post,put,delete,patch]
error
operation-operationid-required
Every operation must have an operationId.
$.paths[*][get,post,put,delete,patch]
warn
operation-operationid-camel-case
operationId should be camelCase (e.g. searchRecipes, getRecipeInformation).
$.paths[*][get,post,put,delete,patch].operationId
warn
operation-tags-required
Every operation must be tagged.
$.paths[*][get,post,put,delete,patch]
warn
tag-title-case
Tag names must be Title Case (e.g. Recipes, Meal Planning, Menu Items).
$.paths[*][get,post,put,delete,patch].tags[*]
info
parameter-description-required
Parameters should have a description.
$.paths[*][get,post,put,delete,patch].parameters[*]
warn
parameter-schema-typed
Parameters must define a typed schema.
$.paths[*][get,post,put,delete,patch].parameters[*].schema
warn
response-success-defined
Operations must define a 200 (or 2xx) success response.
$.paths[*][get,post,put,delete,patch].responses
warn
security-global-defined
A global security requirement must be declared.
$
error
security-apikey-header
The API key security scheme must be an apiKey delivered in the x-api-key header.
$.components.securitySchemes.apiKeyScheme
info
operation-examples-encouraged
Operations are encouraged to provide response examples for mocking.
$.paths[*][get,post,put,delete,patch].responses[*].content[*]
warn
servers-expected-domain
Server URLs should be on the spoonacular.com domain.
$.servers[*].url
warn
path-params-casing
Path parameters should be snake_case (the dominant convention in this API).
$.paths[*].parameters[?(@.in=='path')].name
warn
query-params-casing
Query parameters should be camelCase (the dominant convention in this API).
$.paths[*][get,post,put,patch,delete].parameters[?(@.in=='query')]
warn
schema-names-casing
Component schema names should be PascalCase (the dominant convention in this API).
$.components.schemas
info
schema-properties-casing
Schema properties should be snake_case (the dominant convention in this API).
$.components.schemas[*].properties
warn
operation-documents-401
Operations should document a 401 response (documented on 100% of this API's operations).
$.paths[*][get,post,put,patch,delete].responses
warn
operation-documents-403
Operations should document a 403 response (documented on 100% of this API's operations).
$.paths[*][get,post,put,patch,delete].responses
warn
operation-documents-404
Operations should document a 404 response (documented on 100% of this API's operations).
$.paths[*][get,post,put,patch,delete].responses
warn
no-empty-descriptions
Descriptions must not be empty strings.
$..description