Weather.gov · API Governance Rules
Weather.gov API Rules
Spectral linting rules defining API design standards and conventions for Weather.gov.
24 Rules
error 8
warn 13
info 3
Rule Categories
contact
delete
external
get
info
no
openapi
operation
parameter
paths
response
schema
security
servers
Rules
error
info-title-required
Info must have a title
$.info
warn
info-description-required
Info must have a description
$.info
error
info-version-required
Info must have a version
$.info
error
openapi-version-3
Must use OpenAPI 3.x
$
error
servers-required
Servers array must be defined
$
warn
servers-https-only
All server URLs must use HTTPS
$.servers[*].url
warn
paths-kebab-case
Path segments must use kebab-case
$.paths[*]~
warn
paths-no-trailing-slash
Paths must not have trailing slashes
$.paths[*]~
error
operation-operationId-required
Every operation must have an operationId
$.paths[*][get,post,put,delete,patch]
warn
operation-operationId-snake-case
OperationId must use snake_case
$.paths[*][get,post,put,delete,patch].operationId
warn
operation-description-required
Every operation must have a description
$.paths[*][get,post,put,delete,patch]
warn
operation-tags-required
Every operation must have tags
$.paths[*][get,post,put,delete,patch]
warn
parameter-description-required
Every parameter must have a description
$.paths[*][get,post,put,delete,patch].parameters[*]
error
parameter-schema-required
Every parameter must have a schema
$.paths[*][get,post,put,delete,patch].parameters[*]
error
response-success-required
Every operation must have a 2xx success response
$.paths[*][get,post,put,delete,patch].responses
warn
response-description-required
Every response must have a description
$.paths[*][get,post,put,delete,patch].responses[*]
warn
schema-type-required
Schema properties must define a type
$.components.schemas[*]
info
schema-description-recommended
Schemas should have descriptions
$.components.schemas[*]
warn
security-schemes-defined
Security schemes must be defined in components
$.components.securitySchemes
error
get-no-request-body
GET operations must not have a request body
$.paths[*].get
warn
delete-no-request-body
DELETE operations should not have a request body
$.paths[*].delete
warn
no-empty-descriptions
Descriptions must not be empty strings
$..description
info
contact-info-recommended
Info should have contact details
$.info
info
external-docs-recommended
Spec should have external documentation link
$