Agricultural Marketing Service · API Governance Rules

Agricultural Marketing Service API Rules

Spectral linting rules defining API design standards and conventions for Agricultural Marketing Service.

23 Rules error 10 warn 13
View Rules File View on GitHub

Rule Categories

get info no openapi operation parameter paths response schema servers

Rules

error
info-title-required
OpenAPI info must have a title.
$.info
warn
info-title-prefix
API title should start with "USDA AMS".
$.info.title
warn
info-description-required
OpenAPI info must have a description.
$.info
error
info-version-required
OpenAPI info must have a version.
$.info
error
openapi-version-3
Must use OpenAPI 3.0.x specification.
$
error
servers-defined
At least one server must be defined.
$
error
servers-https-required
Server URLs must use HTTPS.
$.servers[*].url
warn
paths-kebab-case
Path segments should use kebab-case.
$.paths[*]~
warn
paths-no-trailing-slash
Paths must not end with a trailing slash.
$.paths[*]~
error
operation-summary-required
Every operation must have a summary.
$.paths[*][get,post,put,patch,delete]
warn
operation-summary-prefix
Operation summaries should start with "USDA AMS".
$.paths[*][get,post,put,patch,delete].summary
warn
operation-description-required
Every operation must have a description.
$.paths[*][get,post,put,patch,delete]
error
operation-id-required
Every operation must have an operationId.
$.paths[*][get,post,put,patch,delete]
warn
operation-id-camel-case
operationId should use camelCase.
$.paths[*][get,post,put,patch,delete].operationId
warn
operation-tags-required
Every operation must have at least one tag.
$.paths[*][get,post,put,patch,delete]
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.
$.paths[*][get,post,put,patch,delete].parameters[*]
error
response-success-required
Every operation must define at least one 2xx response.
$.paths[*][get,post,put,patch,delete].responses
warn
response-description-required
Every response must have a description.
$.paths[*][get,post,put,patch,delete].responses[*]
warn
schema-description-required
Top-level component schemas should have a description.
$.components.schemas[*]
warn
schema-property-snake-case
Schema property names should use snake_case.
$.components.schemas[*].properties[*]~
error
get-no-request-body
GET operations must not have a request body.
$.paths[*].get
warn
no-empty-descriptions
Descriptions must not be empty strings.
$..description