Thanx · API Governance Rules
Thanx API Rules
Spectral linting rules defining API design standards and conventions for Thanx.
33 Rules
error 6
warn 17
info 10
Rule Categories
thanx
Rules
warn
thanx-info-title
Info title should start with "Thanx".
$.info
warn
thanx-info-description
Info description is required and should be meaningful.
$.info
error
thanx-info-version
Info version is required.
$.info
info
thanx-info-contact
A contact should be present.
$.info
info
thanx-info-license
A license should be present.
$.info
warn
thanx-openapi-3-1
Specs should target OpenAPI 3.1.x.
$
error
thanx-servers-defined
At least one server must be defined.
$
error
thanx-servers-https
Server URLs must use HTTPS.
$.servers[*]
info
thanx-servers-description
Each server should have a description.
$.servers[*]
warn
thanx-paths-snake-case
Path segments should be snake_case (lowercase, underscores), matching Thanx resource paths.
$.paths[*]~
warn
thanx-paths-no-trailing-slash
Paths should not end with a trailing slash.
$.paths[*]~
error
thanx-operation-operationId
Every operation must have an operationId.
$.paths[*][get,post,put,patch,delete]
warn
thanx-operation-operationId-camel-verb
operationId should be camelCase with a verb prefix (get/list/create/update/delete/issue/revoke/activate/finalize/grant/exchange).
$.paths[*][get,post,put,patch,delete]
warn
thanx-operation-summary
Every operation must have a summary.
$.paths[*][get,post,put,patch,delete]
warn
thanx-operation-summary-title-case
Operation summary should be Title Case.
$.paths[*][get,post,put,patch,delete]
info
thanx-operation-description
Every operation should have a description.
$.paths[*][get,post,put,patch,delete]
warn
thanx-operation-tags
Every operation must be tagged.
$.paths[*][get,post,put,patch,delete]
info
thanx-global-tags
A global tags array should be defined.
$
info
thanx-tag-description
Each global tag should have a description.
$.tags[*]
warn
thanx-tag-title-case
Tag names should be Title Case.
$.tags[*]
info
thanx-parameter-description
Parameters should be described.
$.paths[*][get,post,put,patch,delete].parameters[*]
warn
thanx-parameter-snake-case
Parameter names should be snake_case (array params may end in []).
$.paths[*][get,post,put,patch,delete].parameters[?(@.in)]
warn
thanx-request-body-json
Request bodies should offer application/json.
$.paths[*][post,put,patch].requestBody.content
warn
thanx-response-success
Operations should declare a 2xx response.
$.paths[*][get,post,put,patch,delete].responses
warn
thanx-response-description
Each response must have a description.
$.paths[*][get,post,put,patch,delete].responses[*]
info
thanx-error-schema-message
The Error schema should expose a message or error field.
$.components.schemas.Error.properties
warn
thanx-schema-property-snake-case
Schema property names should be snake_case.
$.components.schemas[*].properties[*]~
info
thanx-schema-property-typed
Schema properties should declare a type or a $ref.
$.components.schemas[*].properties[*]
warn
thanx-global-security
A global security requirement should be defined.
$
error
thanx-security-schemes-defined
Security schemes must be defined under components.
$.components
info
thanx-security-bearer
A bearer auth scheme should be present (Thanx uses end-user access tokens).
$.components.securitySchemes
error
thanx-get-no-body
GET operations must not declare a request body.
$.paths[*].get
warn
thanx-delete-no-body
DELETE operations should not declare a request body.
$.paths[*].delete