TheFork · API Governance Rules
TheFork API Rules
Spectral linting rules defining API design standards and conventions for TheFork.
11 Rules
error 4
warn 6
info 1
Rule Categories
thefork
Rules
error
thefork-info-contact
API info must include contact details.
$.info
error
thefork-info-description
API info must include a description.
$.info
error
thefork-server-https
Server URLs must use HTTPS and the api.thefork.io host.
$.servers[*].url
warn
thefork-operation-id-verb
operationId must start with a known verb (get, list, create, update, delete, find, open, close).
$.paths[*][get,post,put,patch,delete].operationId
warn
thefork-operation-summary-title-case
Operation summaries must be Title Case.
$.paths[*][get,post,put,patch,delete].summary
warn
thefork-operation-tags
Every operation must declare at least one tag.
$.paths[*][get,post,put,patch,delete]
warn
thefork-tag-title-case
Tag names must be Title Case.
$.tags[*].name
warn
thefork-path-kebab-case
Path segments (excluding parameters) must be kebab-case.
$.paths[*]~
warn
thefork-property-camel-case
Schema property names must be camelCase.
$.components.schemas[*].properties[*]~
error
thefork-security-defined
A security scheme must be defined (OAuth2 client credentials for B2B, API key for POS).
$.components.securitySchemes
info
thefork-error-responses
Write operations should document a 401 response.
$.paths[*][post,patch,put,delete].responses