Dog API · API Governance Rules
Dog API API Rules
Spectral linting rules defining API design standards and conventions for Dog API.
34 Rules
error 14
warn 19
info 1
Rule Categories
info
openapi
operation
parameter
paths
response
schema
security
servers
tag
tags
Rules
error
info-title-format
API title must begin with "Dog API".
$.info.title
error
info-description-required
API info.description is required and must be at least 40 characters.
$.info
error
info-version-required
API info.version is required.
$.info
warn
info-license-required
API info.license must be present and reference the MIT license used by the upstream open-source project.
$.info
warn
openapi-version-3-1
Use OpenAPI 3.1.x.
$.openapi
error
servers-required
At least one server must be declared.
$
error
servers-https-only
All server URLs must use HTTPS.
$.servers[*].url
warn
servers-dog-ceo-host
Servers must use the canonical dog.ceo host.
$.servers[*].url
warn
paths-kebab-or-lowercase
Path segments must be lowercase (no uppercase letters or underscores).
$.paths[*]~
error
paths-no-trailing-slash
Paths must not end with a trailing slash.
$.paths[*]~
error
paths-no-query-string
Paths must not contain query strings.
$.paths[*]~
error
operation-operationId-required
Every operation must declare an operationId.
#Operation
warn
operation-operationId-camelcase
operationId must be camelCase.
#Operation.operationId
error
operation-summary-required
Every operation must have a summary.
#Operation
warn
operation-summary-dog-api-prefix
Operation summaries must begin with "Dog API".
#Operation.summary
warn
operation-description-required
Every operation must have a description.
#Operation
error
operation-tags-required
Every operation must declare at least one tag.
#Operation
error
operation-get-only
The Dog API is read-only; only GET methods are permitted.
#PathItem
warn
tags-global-array
Global tags array must be defined with descriptions.
$
warn
tag-title-case
Tag names must use Title Case.
$.tags[*].name
warn
tag-description-required
Every tag must have a description.
$.tags[*]
warn
parameter-description-required
Every parameter must declare a description.
#Operation.parameters[*]
warn
parameter-camelcase
Parameter names must be camelCase.
#Operation.parameters[*].name
error
parameter-schema-required
Every parameter must declare a schema.
#Operation.parameters[*]
warn
parameter-no-query
The Dog API uses only path parameters; no query parameters are permitted.
#Operation.parameters[*]
error
response-200-required
Every operation must declare a 200 response.
#Operation.responses
error
response-description-required
Every response must include a description.
#Operation.responses[*]
warn
response-json-content
Every 2xx and 4xx response must define application/json content.
#Operation.responses['200'].content#Operation.responses['404'].content
warn
schema-envelope-message-status
All response schemas must use the {message, status} envelope.
$.components.schemas[?(@.type == 'object')]
warn
schema-status-enum
status property must be an enum of "success" and "error".
$.components.schemas[*].properties.status
warn
schema-description-required
Every component schema must have a description.
$.components.schemas[*]
warn
schema-property-camelcase
Schema properties must be camelCase (e.g., altText, not alt_text).
$.components.schemas[*].properties
warn
security-none-required
The Dog API is fully open and must not declare a security scheme.
$
info
operation-microcks-extension
Operations should include x-microcks-operation for mock server compatibility.
#Operation