Ron Swanson Quotes · API Governance Rules
Ron Swanson Quotes API Rules
Spectral linting rules defining API design standards and conventions for Ron Swanson Quotes.
37 Rules
error 17
warn 14
info 6
Rule Categories
http
info
openapi
operation
parameter
paths
response
schema
servers
tags
Rules
error
info-title-prefix
info.title MUST start with "Ron Swanson Quotes".
$.info.title
error
info-description-required
info.description MUST be present and at least 60 characters long.
$.info
error
info-version-required
info.version MUST be present.
$.info
warn
info-contact-required
info.contact MUST be present with name, url, and email.
$.info
warn
info-license-required
info.license MUST be present with name and url.
$.info
error
openapi-version-3
openapi version MUST be 3.0.x or 3.1.x.
$.openapi
error
servers-defined
At least one server MUST be defined.
$
error
servers-https-required
Server URLs MUST use HTTPS.
$.servers[*].url
warn
servers-description-required
Each server SHOULD have a description.
$.servers[*]
warn
paths-kebab-case
Path segments MUST be lowercase kebab-case (no camelCase, snake_case, or uppercase).
$.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.*~
warn
paths-quotes-resource-plural
The primary resource SHOULD remain plural ("quotes").
$.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-prefix
Operation summary MUST start with "Ron Swanson 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
operationId MUST be camelCase starting with a verb prefix (get|list|create|update|delete|search|patch|replace).
$.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
A global tags array SHOULD be defined.
$
warn
tags-description-required
Each global tag SHOULD have a description.
$.tags[*]
info
tags-title-case
Tag names SHOULD use Title Case (each word capitalised, no separators).
$.tags[*].name
warn
parameter-description-required
Every parameter MUST have a description.
$.paths[*][get,post,put,patch,delete].parameters[*]
error
parameter-schema-required
Every parameter MUST have a schema with a type.
$.paths[*][get,post,put,patch,delete].parameters[*]
info
parameter-name-snake-case
Parameter names SHOULD use snake_case or single-word names.
$.paths[*][get,post,put,patch,delete].parameters[*].name
error
response-success-required
Every operation MUST define at least one 2xx response.
$.paths[*][get,post,put,patch,delete].responses
warn
response-rate-limit-defined
Operations SHOULD document the 429 Too Many Requests response.
$.paths[*][get,post,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
Responses SHOULD return application/json.
$.paths[*][get,post,put,patch,delete].responses[*].content
info
schema-property-snake-case
Schema property names SHOULD use snake_case.
$.components.schemas[*].properties.*~
warn
schema-top-level-description
Each top-level schema SHOULD have a description.
$.components.schemas[*]
error
schema-type-required
Each top-level schema MUST have an explicit type.
$.components.schemas[*]
error
http-get-no-request-body
GET operations MUST NOT define a request body.
$.paths[*].get
error
http-delete-no-request-body
DELETE operations MUST NOT define a request body.
$.paths[*].delete
info
operation-microcks-extension
Operations SHOULD declare x-microcks-operation for mock-server compatibility.
$.paths[*][get,post,put,patch,delete]
info
response-examples-encouraged
Successful JSON responses SHOULD include at least one named example.
$.paths[*][get,post,put,patch,delete].responses[?(@property.match(/^2\d{2}$/))].content.application/json
info
schema-property-example-encouraged
Schema properties SHOULD include an example value.
$.components.schemas[*].properties[*]