target · API Governance Rules
target API Rules
Spectral linting rules defining API design standards and conventions for target.
21 Rules
error 4
warn 16
info 1
Rule Categories
error
no
operation
path
query
schema
servers
target
Rules
warn
target-operation-ids-camel-case
Operation IDs must use camelCase
$.paths[*][*].operationId
warn
target-tags-title-case
Tags must use Title Case
$.tags[*].name
warn
target-path-kebab-case
Path segments must use kebab-case
$.paths[*]~
warn
target-paths-versioned
All paths must include a version prefix (e.g., /v1/, /v3/)
$.paths[*]~
error
target-operation-summary-exists
All operations must have a summary
$.paths[*][get,post,put,patch,delete]
warn
target-operation-description-exists
All operations must have a description
$.paths[*][get,post,put,patch,delete]
error
target-responses-200-exists
All operations must have a 200 response
$.paths[*][get,post,put,patch,delete].responses
warn
target-responses-401-exists
Secured operations must document 401 response
$.paths[*][get,post,put,patch,delete].responses
warn
target-parameters-description
All parameters must have descriptions
$.paths[*][*].parameters[*]
error
target-bearer-auth-defined
bearerAuth security scheme must be defined
$.components.securitySchemes
warn
target-info-contact
API must include contact information
$.info
info
target-schema-properties-described
Schema properties should have descriptions
$.components.schemas[*].properties[*]
error
servers-https-only
Server URLs must use HTTPS.
$.servers[*].url
warn
servers-expected-domain
Server URLs should be on the target.com domain.
$.servers[*].url
warn
path-params-casing
Path parameters should be snake_case (the dominant convention in this API).
$.paths[*].parameters[?(@.in=='path')].name
warn
query-params-casing
Query parameters should be snake_case (the dominant convention in this API).
$.paths[*][get,post,put,patch,delete].parameters[?(@.in=='query')]
warn
schema-names-casing
Component schema names should be PascalCase (the dominant convention in this API).
$.components.schemas
warn
schema-properties-casing
Schema properties should be snake_case (the dominant convention in this API).
$.components.schemas[*].properties
warn
error-schema-defined
A shared error schema (Error) should be defined for error payloads.
$.components.schemas
warn
operation-documents-429
Operations should document a 429 response (documented on 89% of this API's operations).
$.paths[*][get,post,put,patch,delete].responses
warn
no-empty-descriptions
Descriptions must not be empty strings.
$..description