US AbilityOne Commission · API Governance Rules
US AbilityOne Commission API Rules
Spectral linting rules defining API design standards and conventions for US AbilityOne Commission.
25 Rules
error 7
warn 11
Rule Categories
abi
Rules
error
abi-info-title-present
API info must have a title
$.info
warn
abi-info-description-present
API info must have a description
$.info
error
abi-info-version-present
API info must have a version
$.info
warn
abi-info-contact-present
Government APIs must have contact information
$.info
error
abi-openapi-version
Must use OpenAPI 3.x
$
warn
abi-servers-present
API must define servers
$
warn
abi-server-url-https
Server URLs should use HTTPS
$.servers[*].url
hint
abi-server-gov-domain
Government APIs should use .gov domains
$.servers[*].url
error
abi-paths-present
API must define paths
$
warn
abi-path-lowercase
Path segments should be lowercase
$.paths[*]~
error
abi-operation-id-present
All operations must have an operationId
$.paths[*][get,post,put,patch,delete]
warn
abi-operation-summary-present
All operations must have a summary
$.paths[*][get,post,put,patch,delete]
hint
abi-operation-description-present
All operations should have a description
$.paths[*][get,post,put,patch,delete]
warn
abi-operation-tags-present
All operations must have at least one tag
$.paths[*][get,post,put,patch,delete]
error
abi-response-description-present
All responses must have a description
$.paths[*][get,post,put,patch,delete].responses[*]
error
abi-response-success-present
Operations must define a 2xx success response
$.paths[*][get,post,put,patch,delete].responses
hint
abi-schema-description-present
All schemas should have a description
$.components.schemas[*]
hint
abi-schema-properties-examples
Schema properties should include examples
$.components.schemas[*].properties[*]
hint
abi-nsn-format-pattern
NSN fields should define the correct format pattern
$.paths[*][get,post].parameters[?(@.name == 'nsn')].schema
warn
abi-status-enum-defined
Status fields should use an enum to restrict values
$.components.schemas[*].properties.status
warn
abi-nonprofit-affiliate-enum
Nonprofit affiliate fields should restrict to NIB or SourceAmerica
$.components.schemas[*].properties.nonprofitAffiliate
warn
abi-get-no-request-body
GET operations should not have a request body
$.paths[*].get
hint
abi-microcks-operation-present
Operations should include Microcks extension for mocking
$.paths[*][get,post,put,patch,delete]
hint
abi-examples-in-responses
Responses should include examples for documentation
$.paths[*][get,post,put,patch,delete].responses[*].content[*]
warn
abi-parameter-description-present
All parameters should have a description
$.paths[*][get,post,put,patch,delete].parameters[*]