Agricultural Statistics Service · API Governance Rules
Agricultural Statistics Service API Rules
Spectral linting rules defining API design standards and conventions for Agricultural Statistics Service.
21 Rules
error 11
warn 10
Rule Categories
get
info
no
openapi
operation
parameter
response
schema
security
servers
Rules
error
info-title-required
OpenAPI info must have a title.
$.info
warn
info-title-prefix
API title should start with "USDA NASS".
$.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
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 NASS".
$.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-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-401-defined
Protected operations should define a 401 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[*]
error
security-schemes-defined
Security schemes must be defined in components.
$.components
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