albertsons · API Governance Rules

albertsons API Rules

Spectral linting rules defining API design standards and conventions for albertsons.

35 Rules error 16 warn 14 info 5
View Rules File View on GitHub

Rule Categories

delete examples get info no openapi operation parameter paths request response schema security servers tags

Rules

error
info-title-required
Info title must be defined and start with "Albertsons".
$.info.title
error
info-description-required
Info description must be defined with meaningful content.
$.info.description
error
info-version-required
API version must be specified.
$.info.version
warn
info-contact-required
Contact information should be provided.
$.info.contact
error
openapi-version-3
All specs must use OpenAPI 3.x.
$.openapi
error
servers-required
At least one server must be defined.
$.servers
error
servers-https-only
Server URLs must use HTTPS.
$.servers[*].url
warn
paths-kebab-case
Path segments must use kebab-case (lowercase with hyphens).
$.paths[*]~
warn
paths-no-trailing-slash
Paths must not end with a trailing slash.
$.paths[*]~
info
paths-plural-resource-nouns
Resource path segments should use plural nouns.
$.paths[*]~
error
operation-summary-required
Every operation must have a summary.
$.paths[*][get,post,put,patch,delete].summary
warn
operation-summary-albertsons-prefix
Operation summaries must start with "Albertsons".
$.paths[*][get,post,put,patch,delete].summary
error
operation-description-required
Every operation must have a description.
$.paths[*][get,post,put,patch,delete].description
error
operation-operationid-required
Every operation must have an operationId.
$.paths[*][get,post,put,patch,delete].operationId
warn
operation-operationid-camel-case
operationId must use camelCase.
$.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].tags
warn
tags-global-defined
Global tags array should be defined.
$.tags
warn
tags-description-required
All global tags must have descriptions.
$.tags[*].description
error
parameter-description-required
All parameters must have descriptions.
$.paths[*][get,post,put,patch,delete].parameters[*].description
info
parameter-snake-case
Query and path parameter names should use camelCase or snake_case.
$.paths[*][get,post,put,patch,delete].parameters[*].name
warn
request-body-content-json
Request bodies should use application/json content type.
$.paths[*][post,put,patch].requestBody.content
info
request-body-description
Request body content should have a schema with 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-required
Secured endpoints should define a 401 response.
$.paths[*][get,post,put,patch,delete].responses
error
response-description-required
All responses must have descriptions.
$.paths[*][get,post,put,patch,delete].responses[*].description
warn
schema-description-required
Top-level schemas must have descriptions.
$.components.schemas[*].description
warn
schema-type-required
All schemas must define a type.
$.components.schemas[*].type
info
schema-property-camel-case
Schema property names should use camelCase.
$.components.schemas[*].properties[*]~
error
security-schemes-defined
Security schemes must be defined in components.
$.components.securitySchemes
warn
security-bearer-auth
Bearer authentication scheme should be defined.
$.components.securitySchemes.bearerAuth
warn
security-operation-defined
Each operation should define security requirements.
$.paths[*][get,post,put,patch,delete].security
error
get-no-request-body
GET operations must not have request bodies.
$.paths[*].get.requestBody
warn
delete-no-request-body
DELETE operations should not have request bodies.
$.paths[*].delete.requestBody
error
no-empty-descriptions
Descriptions must not be empty strings.
$..description
info
examples-encouraged
Schema properties should include example values.
$.components.schemas[*].properties[*]