chucknorris.io · API Governance Rules
chucknorris.io API Rules
Spectral linting rules defining API design standards and conventions for chucknorris.io.
10 Rules
error 4
warn 6
Rule Categories
chucknorris
Rules
warn
chucknorris-info-contact
Spec must include the chucknorris.io maintainer contact.
$.info.contact
warn
chucknorris-info-license-gpl
Top-level spec license must be GPL-3.0 (matches chuck-api).
$.info.license
error
chucknorris-server-base-url
The only documented production server is https://api.chucknorris.io.
$.servers[*].url
error
chucknorris-paths-under-jokes
All operation paths must live under /jokes.
$.paths
warn
chucknorris-operation-summary-title-case
Operation summaries should be in Title Case.
$.paths[*][get,post,put,patch,delete,options,head].summary
error
chucknorris-operation-id-required
Every operation must declare an operationId.
$.paths[*][get,post,put,patch,delete,options,head]
warn
chucknorris-operation-id-camelcase
operationId should be camelCase (e.g. getRandomJoke).
$.paths[*][get,post,put,patch,delete,options,head].operationId
warn
chucknorris-success-must-have-json
2xx responses must include an application/json content type.
$.paths[*][get,post,put,patch,delete,options,head].responses[?(@property.match(/2\d\d/))].content
error
chucknorris-joke-schema-required-fields
The Joke schema must require the canonical chucknorris.io fields.
$.components.schemas.Joke
warn
chucknorris-search-query-min-length
The /jokes/search `query` parameter should declare a minLength.
$.paths['/jokes/search'].get.parameters[?(@.name=='query')].schema