BigChange · API Governance Rules
BigChange — openapi linting rules
Spectral linting rules defining API design standards and conventions for BigChange.
37 Rules
error 27
warn 10
Published by BigChange
Served by the provider at https://github.com/BigChangeApps/openapi-linting/blob/6dd2b3aad9a015b3510f2c146a7887bea5253ab1/rest/.spectral.yaml; the copy below was fetched from there.
Rule Categories
delete
endpoint
get
headers
https
openapi
patch
path
post
put
request
response
schema
uris
Rules
warn
uris-overly-nested
RS103 - URIs should not be overly uris-overly-nested
$.paths.*~
error
uris-trailing-slash
RS104 - URIs must not require trailing slashes
$.paths.*~
error
uris-use-descriptive-id-path-names
RS105 - URI dynamic path parameters must be named correctly
$..parameters[?(@.in == 'path')]
error
uris-resource-name-not-contain-api
RS106 - URI resource / endpoint names must not include 'api'
$.paths.*~
error
uris-paths-params-camel-case
RS107 - URI path parameters must use camel case
$.paths.*.*.parameters[?(@.in=='path')].name
error
headers-no-x-prefix
RS108 - Headers must be prefixed by 'X-'
$..parameters[?(@.in == 'header')].name
error
headers-hyphenated-pascal-case
RS109 - Headers must use Hyphenated-Pascal-Case notation
$..parameters[?(@.in == 'header')].name
error
openapi-above-v3
RS200 - Every API must provide a OpenAPI v3.0 specification (or above)
$
error
endpoint-summary-length
RS202 - HTTP methods must be properly described
$.paths[*][*].summary
error
endpoint-description-length
RS202 - HTTP methods must be properly described
$.paths[*][*].description
error
request-query-params-documentation-missing
RS204 - HTTP methods must document all query string parameters
$.paths.*.*.parameters[?(@.in=='query')]
warn
schema-properties-documentation-missing
RS206 - Payload schema fields must clearly document their purpose
$.components.schemas[?(@.type == 'object')].properties[?(@.type == 'string' || @.type == 'number' || @.type == 'boolean' || @.type == 'number')]
warn
schema-properties-documentation-minlength
RS206 - Payload schema fields must clearly document their purpose
$..*.properties[*].description
warn
schema-properties-example-missing
RS207 - Payload schema fields must provide an example value for simple types
$..*.properties[?(@.type != 'array' && @.type != 'object')]
warn
endpoint-responses-common-server-error
RS209 - HTTP methods should include standard 500 response
$.paths..responses
error
schema-properties-documentation-full-stop-ending
RS210 - Payload field documentation should not be automatically generated
$..*.properties[*].description
error
schema-properties-documentation-gets-prefix
RS210 - Payload field documentation should not be automatically generated
$..*.properties[*].description
error
request-GET-no-body
RS300 - GET methods must not accept a request body
$.paths..get.parameters..in
error
response-collections-enveloped
RS304 - GET methods must envelope their result sets when returning collections
$.paths[*].get.responses.200.content.application/json[?(@.type)]
warn
request-writes-no-query-strings
RS307 - POST, PUT, PATCH and DELETE requests should not require query strings
$.paths[*].[put,patch,post,delete].parameters.[?(@.in == 'query')].schema
error
request-query-params-not-required
RS310 - Query parameters should be optional
$.paths.*.*.parameters[?(@.in=='query')].required
error
request-query-params-camel-case
RS311 - Query string parameters must use camelCase
$.paths.*.*.parameters[?(@.in=='query')].name
error
get-response-codes
RS400 - HTTP responses must return an acceptable status code
$.paths[*].get.responses
error
delete-response-codes
RS400 - HTTP responses must return an acceptable status code
$.paths[*].delete.responses
warn
put-response-codes
RS400 - HTTP responses should return an acceptable status code
$.paths[*].put.responses
warn
patch-response-codes
RS400 - HTTP responses should return an acceptable status code
$.paths[*].patch.responses
error
post-response-codes
RS400 - HTTP responses must return an acceptable status code
$.paths[*].post.responses
error
response-204-no-body
RS403 - PUT/PATCH/DELETE responses must not return a response body when status code is 204
$.paths[*][*]].responses.204
error
request-support-json
RS500 - APIs must support JSON as payload data interchange format
$.paths.[*].requestBody.content[?(@property.indexOf('json') === -1)]^
error
response-success-support-json
RS500 - APIs must support JSON or CSV as payload data interchange format
$.paths..responses[?( @property >= 200 && @property < 300 && @property != 204)].content[*]~
warn
schema-names-pascal-case
RS501 - APIs should use camelCase for request / response payload schema
$.components.schemas.*~
warn
schema-property-names-camelCase
RS501 - APIs should use camelCase for request / response payload schema
$..[?(@.type === 'object' && @.properties)].properties.*~
error
schema-property-boolean-naming-convention
RS504 - Boolean fields should be consistently named
$..[?(@.type === 'object' && @.properties)].properties.[?(@.type== 'boolean')]~
error
schema-property-datetime-naming-convention
RS505 - Timestamp fields should be consistently named
$..[?(@.type === 'object' && @.properties)].properties.[?(@.format== 'date-time')]~
error
response-fail-support-problem-json
RS600 - Error responses must be presented in a standard format (application/problem+json)
$.paths..responses[?( @property >= 400)].content[*]~
error
path-must-include-version
RS700 - API specifications must use URI based versioning
$.paths[*]~
error
https-only
RS800 - Public APIs must exclusively use HTTPS
$.servers..url
Spectral Ruleset
Work with this as data
Every ruleset here is available over the APIs.io API and to AI agents over MCP.