kanye.rest · API Governance Rules
kanye.rest API Rules
Spectral linting rules defining API design standards and conventions for kanye.rest.
40 Rules
error 14
warn 18
info 8
Rule Categories
info
method
no
openapi
operation
parameters
paths
requestbody
response
schema
security
servers
tags
Rules
warn
info-title-prefix
Spec title must begin with "Kanye REST".
$.info.title
warn
info-description-required
A long-form description is required on info.
$.info
warn
info-license-required
License metadata is required (project is MIT).
$.info
info
info-contact-required
Contact info is required so consumers know who to reach.
$.info
warn
openapi-version-3-0-3
Pin OpenAPI to the 3.0.x line used by this provider.
$.openapi
error
servers-defined
At least one server must be defined.
$.servers
error
servers-https-only
All servers must use HTTPS.
$.servers[*].url
warn
servers-canonical-host
The Kanye REST canonical host is api.kanye.rest.
$.servers[*].url
info
servers-description-required
Servers should describe what environment they represent.
$.servers[*]
error
paths-lowercase
Path segments must be lowercase.
$.paths[*]~
error
paths-no-trailing-slash
Paths must not end with a trailing slash (except root).
$.paths[*]~
error
paths-no-path-parameters
Kanye REST exposes no path parameters; resources are flat.
$.paths[*]~
error
paths-no-query-string
Paths must not contain a query string.
$.paths[*]~
warn
operation-get-only
All Kanye REST operations are GET.
$.paths[*]
error
operation-summary-required
Every operation must have a summary.
$.paths[*][get,post,put,patch,delete]
warn
operation-summary-prefix
Operation summaries must start with "Kanye REST".
$.paths[*][get,post,put,patch,delete].summary
error
operation-description-required
Every operation must have a description.
$.paths[*][get,post,put,patch,delete]
error
operation-operationid-required
Every operation must have a camelCase operationId.
$.paths[*][get,post,put,patch,delete]
warn
operation-operationid-camelcase
operationId must be camelCase.
$.paths[*][get,post,put,patch,delete].operationId
info
operation-operationid-verb-prefix
operationId must start with a known verb prefix.
$.paths[*][get,post,put,patch,delete].operationId
error
operation-tags-required
Every operation must declare at least one tag.
$.paths[*][get,post,put,patch,delete]
info
operation-microcks-operation-required
Every operation must declare an x-microcks-operation block for mockability.
$.paths[*][get,post,put,patch,delete]
warn
tags-defined-globally
A global tags array must be defined with descriptions.
$
warn
tags-title-case
Tags must use Title Case (e.g. "Quotes").
$.tags[*].name
warn
tags-description-required
Each global tag must have a description.
$.tags[*]
warn
parameters-not-used
Kanye REST exposes no parameters; reject any.
$.paths[*][get,post,put,patch,delete].parameters
warn
requestbody-not-used
Kanye REST exposes no request bodies; all operations are pure reads.
$.paths[*][get,post,put,patch,delete].requestBody
error
response-200-required
Every operation must define a 200 success response.
$.paths[*][get,post,put,patch,delete].responses
warn
response-500-required
Every operation must define a 500 error response.
$.paths[*][get,post,put,patch,delete].responses
error
response-description-required
Each response must have a description.
$.paths[*][get,post,put,patch,delete].responses[*]
info
response-json-content
2xx responses other than /text must use application/json.
$.paths[*][get,post,put,patch,delete].responses[200].content
info
response-example-required
Every 200 response should ship a named example for mock servers.
$.paths[*][get,post,put,patch,delete].responses[200].content[*]
warn
schema-property-camelcase
Schema property names must be camelCase or single-word lowercase.
$.components.schemas[*].properties[*]~
warn
schema-property-description
Schema properties must be described.
$.components.schemas[*].properties[*]
error
schema-property-type-required
Schema properties must declare a type or $ref.
$.components.schemas[*].properties[*]
info
schema-property-example
Schema properties should declare an example value.
$.components.schemas[*].properties[*]
warn
schema-top-level-description
Top-level schemas must have a description.
$.components.schemas[*]
info
security-none
Kanye REST is an open, unauthenticated public API; reject security schemes.
$.components.securitySchemes
error
method-get-no-request-body
GET operations must not declare a request body.
$.paths[*].get.requestBody
warn
no-empty-descriptions
Descriptions must not be empty strings.
$..description