Edamam · API Governance Rules
Edamam API Rules
Spectral linting rules defining API design standards and conventions for Edamam.
39 Rules
error 8
warn 16
info 15
Rule Categories
get
info
openapi
operation
parameter
paths
post
request
response
schema
security
servers
tag
tags
Rules
error
info-title-required
The API must have a title.
$.info
warn
info-title-edamam-prefix
API title should start with "Edamam".
$.info.title
warn
info-description-required
The API must have a meaningful description.
$.info
info
info-description-min-length
The API description should be at least 40 characters.
$.info.description
error
info-version-required
The API must declare a version.
$.info
info
info-contact-required
The API should declare contact information.
$.info
warn
openapi-version-3-1
Edamam specs target OpenAPI 3.1.x.
$.openapi
error
servers-defined
At least one server must be defined.
$.servers
error
servers-https-only
Servers must use HTTPS.
$.servers[*].url
info
servers-edamam-host
Production server should be api.edamam.com.
$.servers[*].url
info
servers-description
Each server should have a description.
$.servers[*]
warn
paths-no-trailing-slash
Paths must not end with a trailing slash.
$.paths[*]~
warn
paths-kebab-case
Path segments should be lowercase kebab-case (allowing version tokens like v2 and {param} placeholders).
$.paths[*]~
error
paths-no-query-string
Path keys must not contain query strings.
$.paths[*]~
error
operation-operationId-required
Every operation must declare an operationId.
$.paths[*][get,post,put,patch,delete]
warn
operation-operationId-camelcase
operationId should be camelCase (e.g. searchRecipes, analyzeIngredient).
$.paths[*][get,post,put,patch,delete].operationId
warn
operation-summary-required
Every operation must have a summary.
$.paths[*][get,post,put,patch,delete]
warn
operation-summary-edamam-prefix
Operation summaries should be prefixed with "Edamam".
$.paths[*][get,post,put,patch,delete].summary
info
operation-description-required
Every operation should have a description.
$.paths[*][get,post,put,patch,delete]
warn
operation-tags-required
Every operation must be tagged.
$.paths[*][get,post,put,patch,delete]
info
tags-global-defined
A global tags array should be defined.
$
info
tag-description-required
Each global tag should have a description.
$.tags[*]
warn
tag-title-case
Tag names should be Title Case (e.g. "Recipe Search", "Food Database").
$.tags[*].name
warn
parameter-description-required
Every parameter should have a description.
$.paths[*][*].parameters[*]
warn
parameter-schema-type
Every parameter schema must declare a type.
$.paths[*][*].parameters[*].schema
info
parameter-example-encouraged
Parameters should provide an example value.
$.paths[*][*].parameters[*]
warn
request-body-json
Request bodies should offer application/json content.
$.paths[*][post,put,patch].requestBody.content
error
response-2xx-required
Every operation must define at least one 2xx response.
$.paths[*][get,post,put,patch,delete].responses
info
response-401-defined
Authenticated operations should document a 401 response.
$.paths[*][get,post,put,patch,delete].responses
warn
response-description-required
Every response must have a description.
$.paths[*][*].responses[*]
info
schema-property-camelcase
Schema property names should be camelCase, matching Edamam's JSON fields (e.g. totalNutrients, healthLabels, foodId). Underscore-prefixed HATEOAS keys like _links and SCREAMING_SNAKE nutrient codes are permitted.
$.components.schemas[*].properties[*]~
info
schema-object-type
Schemas should declare a type.
$.components.schemas[*]
warn
security-global-defined
A global security requirement should be defined.
$
warn
security-schemes-defined
Security schemes must be defined under components.
$.components
info
security-scheme-description
Each security scheme should be described.
$.components.securitySchemes[*]
error
get-no-request-body
GET operations must not declare a request body.
$.paths[*].get
info
post-has-request-body
POST operations should declare a request body.
$.paths[*].post
info
operation-microcks-extension
Operations should carry an x-microcks-operation extension for mock-server compatibility.
$.paths[*][get,post,put,patch,delete]
info
response-examples-encouraged
JSON responses should provide examples.
$.paths[*][*].responses[*].content.application/json