Flipdish · API Governance Rules
Flipdish API Rules
Spectral linting rules defining API design standards and conventions for Flipdish.
28 Rules
error 10
warn 11
info 7
Rule Categories
delete
get
global
info
openapi
operation
parameter
paths
request
response
schema
security
servers
tag
tags
Rules
warn
info-title-flipdish-prefix
API title should start with 'Flipdish'.
$.info.title
warn
info-description-required
The info block must have a description.
$.info
error
info-version-required
The info block must declare a version.
$.info
warn
info-contact-email-flipdish
Contact email must be [email protected] (per Flipdish API Design Guide).
$.info.contact.email
error
openapi-version-3
Specs must be OpenAPI 3.0.x.
$.openapi
error
servers-defined
A servers array must be defined.
$
error
servers-flipdish-production-only
Only Flipdish production domains (https://api.flipdish.co) are allowed as server URLs.
$.servers[*].url
warn
paths-no-trailing-slash
Paths should not end with a trailing slash.
$.paths
warn
paths-lower-camel-segments
Path segments should be lowerCamelCase (Flipdish convention), parameters in {braces}.
$.paths
error
operation-summary-required
Every operation must have a summary (Flipdish API Design Guide).
$.paths[*][get,post,put,delete,patch]
info
operation-summary-flipdish-prefix
Operation summaries should begin with 'Flipdish'.
$.paths[*][get,post,put,delete,patch].summary
error
operation-description-required
Every operation must have a description (Flipdish API Design Guide).
$.paths[*][get,post,put,delete,patch]
error
operation-operationid-required
Every operation must declare an operationId.
$.paths[*][get,post,put,delete,patch]
info
operation-operationid-pascal-case
operationId uses PascalCase (Flipdish convention, e.g. GetAccountDetails).
$.paths[*][get,post,put,delete,patch].operationId
warn
operation-tags-required
Every operation must be tagged.
$.paths[*][get,post,put,delete,patch]
info
tag-description-required
Global tags should have descriptions.
$.tags[*]
info
tags-pascal-case
Tags use PascalCase resource names (Flipdish convention, e.g. Stores, MenuSections).
$.tags[*].name
warn
parameter-description-required
Parameters must have descriptions.
$.paths[*][*].parameters[*]
warn
parameter-schema-required
Parameters must declare a schema with a type.
$.paths[*][*].parameters[?(@.in)]
info
request-body-json
Request bodies should offer application/json content.
$.paths[*][post,put,patch].requestBody.content
error
response-approved-status-codes
Only Flipdish-approved status codes may be used.
$.paths[*][*].responses.*~
info
response-unauthorized-defined
Operations should document a 401 Unauthorized response.
$.paths[*][get,post,put,delete,patch].responses
warn
response-error-object
4xx/5xx JSON responses must include an 'error' object (Flipdish error format).
$.paths[*][*].responses[400,401,403,404,409,414,429,500].content[application/json].schema
warn
global-security-defined
A global security requirement must be defined (OAuth 2.0).
$
error
security-scheme-oauth2
The oauth2 security scheme must be defined in components.
$.components.securitySchemes
info
schema-properties-typed
Schema properties should declare a type, $ref, or composition keyword.
$.components.schemas[*].properties[*]
error
get-no-request-body
GET operations must not declare a request body.
$.paths[*].get
warn
delete-no-request-body
DELETE operations should not declare a request body.
$.paths[*].delete