Holiday API · API Governance Rules
Holiday API API Rules
Spectral linting rules defining API design standards and conventions for Holiday API.
16 Rules
error 9
warn 7
Rule Categories
api
components
format
info
operation
paths
response
servers
Rules
error
info-title-required
Info title must be present
$.info
error
info-description-required
Info description must be present
$.info
warn
info-contact-required
Info contact block must be present
$.info
warn
info-termsOfService-required
Info termsOfService URL must be present
$.info
error
operation-operationid-required
Every operation must have an operationId
$.paths[*][get,post,put,patch,delete]
error
operation-summary-required
Every operation must have a summary
$.paths[*][get,post,put,patch,delete]
warn
operation-summary-title-case
Operation summaries should use Title Case (Holiday API convention)
$.paths[*][get,post,put,patch,delete].summary
error
operation-tags-required
Every operation must have at least one tag
$.paths[*][get,post,put,patch,delete]
warn
operation-description-required
Every operation should have a description
$.paths[*][get,post,put,patch,delete]
error
api-key-query-param-required
Holiday API operations must accept a 'key' query parameter (per provider auth convention)
$.paths[*][get,post,put,patch,delete].parameters[?(@.name=='key')]
error
api-key-required-true
The 'key' parameter must be required
$.paths[*][get,post,put,patch,delete].parameters[?(@.name=='key')]
error
paths-must-be-versioned
All paths must be prefixed with /v1 (Holiday API versioning convention)
$.paths
error
servers-defined
Top-level servers must be defined
$
warn
components-schemas-defined
Reusable schemas must live under components.schemas
$.components
warn
response-schema-required
2xx responses must reference a schema
$.paths[*][get,post,put,patch,delete].responses['200'].content['application/json']
warn
format-param-enum-consistent
When present, format parameter must enumerate the supported response formats
$.paths[*][get,post,put,patch,delete].parameters[?(@.name=='format')]