Programming Quotes · API Governance Rules
Programming Quotes API Rules
Spectral linting rules defining API design standards and conventions for Programming Quotes.
42 Rules
error 15
warn 24
info 3
Authorship not recorded
No authorship marker is recorded for this file. It is not presented as the provider's; it was most likely written by an API Evangelist pass before outputs were stamped.
Rule Categories
http
info
microcks
no
openapi
operation
parameter
paths
request
response
schema
security
servers
tags
Rules
warn
info-title-format
Info title must start with "Programming Quotes".
$.info.title
warn
info-description-min-length
Info description must be at least 50 characters.
$.info.description
warn
info-contact-required
Info contact block is required.
$.info
warn
info-license-required
Info license block is required (community license is fine).
$.info
error
openapi-version-3-0-x
Must use OpenAPI 3.0.x.
$.openapi
error
servers-defined
At least one server must be declared.
$
error
servers-https-only
All server URLs must be HTTPS.
$.servers[*].url
warn
servers-description-required
Each server must have a description.
$.servers[*]
warn
paths-kebab-case
Path segments must be kebab-case (lowercase, hyphens). Path params allowed.
$.paths[*]~
error
paths-no-trailing-slash
Paths must not end with a trailing slash.
$.paths[*]~
error
paths-no-query-strings
Paths must not contain query strings.
$.paths[*]~
error
operation-summary-required
Every operation must have a summary.
$.paths[*][get,post,put,patch,delete]
warn
operation-description-required
Every operation must have a description.
$.paths[*][get,post,put,patch,delete]
warn
operation-summary-provider-prefix
Operation summaries should start with "Programming Quotes".
$.paths[*][get,post,put,patch,delete].summary
error
operation-operationid-required
Every operation must have an operationId.
$.paths[*][get,post,put,patch,delete]
warn
operation-operationid-camel-case
operationIds must be camelCase.
$.paths[*][get,post,put,patch,delete].operationId
info
operation-operationid-verb-prefix
operationIds should start with a known verb (get, list, create, update, delete, add, vote, issue).
$.paths[*][get,post,put,patch,delete].operationId
error
operation-tags-required
Every operation must have at least one tag.
$.paths[*][get,post,put,patch,delete]
warn
tags-global-defined
Global tags array must be defined.
$
warn
tags-title-case
Tag names must be Title Case single words (e.g., Quotes, Authentication).
$.tags[*].name
warn
tags-description-required
Each global tag must have a description.
$.tags[*]
warn
parameter-description-required
Every parameter must have a description.
$.paths[*][get,post,put,patch,delete].parameters[*]
warn
parameter-query-camel-case
Query parameters must be camelCase (matches `quotesPerPage`, `author`, `page`).
$.paths[*][get,post,put,patch,delete].parameters[?(@.in == 'query')].name
error
parameter-schema-required
Every parameter must have a schema with a type.
$.paths[*][get,post,put,patch,delete].parameters[*]
error
request-body-json-content-type
Request bodies must offer application/json.
$.paths[*][post,put,patch].requestBody.content
warn
request-body-description-required
Request bodies should have a description.
$.paths[*][post,put,patch].requestBody
error
response-success-required
Every operation must define at least one 2xx response.
$.paths[*][get,post,put,patch,delete].responses
warn
response-401-on-writes
Write operations should document a 401 response.
$.paths[*][post,put,patch,delete].responses
warn
response-404-on-by-id
Operations on /quotes/{id} should document a 404.
$.paths[?(@property.match(/\{id\}/))][get,put,patch,delete].responses
error
response-description-required
Every response must have a description.
$.paths[*][get,post,put,patch,delete].responses[*]
warn
response-json-content-type
2xx and 4xx responses should use application/json (204 may omit content).
$.paths[*][get,post,put,patch,delete].responses[?(@property.match(/^(2[0-35-9][0-9]|4[0-9]{2})$/))].content
warn
response-error-schema-has-message
Error response schemas should expose a `message` field.
$.components.schemas.ErrorResponse.properties
warn
schema-property-camel-case
Schema properties must be camelCase (allow MongoDB `_id`).
$.components.schemas[*].properties[*]~
warn
schema-top-level-description
Top-level schemas must have a description.
$.components.schemas[*]
error
schema-top-level-type
Top-level schemas must have a type.
$.components.schemas[*]
error
security-scheme-defined
A bearerAuth security scheme must be defined.
$.components.securitySchemes
warn
security-bearer-jwt
bearerAuth must declare bearerFormat=JWT.
$.components.securitySchemes.bearerAuth
warn
security-write-operations-protected
Write operations (POST/PUT/DELETE on /quotes**) must declare security.
$.paths[?(@property.match(/^\/quotes/))][post,put,delete]
error
http-get-no-request-body
GET operations must not declare a request body.
$.paths[*].get
info
http-delete-204
DELETE operations should document a 204 No Content response.
$.paths[*].delete.responses
warn
no-empty-descriptions
Descriptions must not be empty strings.
$..description
info
microcks-operation-extension
Each operation should declare x-microcks-operation for mock-server compatibility.
$.paths[*][get,post,put,patch,delete]
Spectral Ruleset
Work with this as data
Every ruleset here is available over the APIs.io API and to AI agents over MCP.