Paytronix · API Governance Rules
Paytronix API Rules
Spectral linting rules defining API design standards and conventions for Paytronix.
33 Rules
error 5
warn 17
info 11
Rule Categories
delete
get
info
openapi
operation
parameter
request
response
schema
security
server
servers
tag
tags
Rules
warn
info-title-paytronix-prefix
API title should begin with "Paytronix".
$.info.title
warn
info-description-required
Info object must have a non-trivial description.
$.info
error
info-version-required
Info object must declare a version.
$.info
info
info-contact-required
Info object should declare a contact.
$.info
warn
openapi-version-3
Specs should target OpenAPI 3.0.x.
$.openapi
error
servers-defined
At least one server must be defined.
$
warn
server-https
Server URLs must use HTTPS.
$.servers[*].url
info
server-description
Each server should have a description.
$.servers[*]
warn
operation-summary-required
Every operation must have a summary.
$.paths[*][get,post,put,delete,patch]
warn
operation-summary-title-case
Operation summaries must use Title Case (each word capitalized).
$.paths[*][get,post,put,delete,patch].summary
warn
operation-description-required
Every operation must have a description.
$.paths[*][get,post,put,delete,patch]
error
operation-operationid-required
Every operation must have an operationId.
$.paths[*][get,post,put,delete,patch]
warn
operation-operationid-camelcase
operationId must be camelCase.
$.paths[*][get,post,put,delete,patch].operationId
info
operation-operationid-verb-prefix
operationId should start with a known verb prefix.
$.paths[*][get,post,put,delete,patch].operationId
warn
operation-tags-required
Every operation must declare at least one tag.
$.paths[*][get,post,put,delete,patch]
info
operation-microcks-extension
Each operation should carry an x-microcks-operation extension for mock compatibility.
$.paths[*][get,post,put,delete,patch]
warn
tags-global-defined
A global tags array must be defined.
$
info
tag-description
Each global tag should have a description.
$.tags[*]
warn
tag-title-case
Tag names must use Title Case.
$.tags[*].name
warn
parameter-description-required
Every parameter must have a description.
$.paths[*][get,post,put,delete,patch].parameters[*]
warn
parameter-schema-typed
Every parameter schema must declare a type.
$.paths[*][get,post,put,delete,patch].parameters[*].schema
info
parameter-camelcase
Query and path parameter names should be camelCase (PXS) or snake_case (Open Dining search).
$.paths[*][get,post,put,delete,patch].parameters[*].name
warn
request-body-json
Request bodies should provide an application/json media type.
$.paths[*][post,put,patch].requestBody.content
warn
request-body-schema
Request body JSON media type must reference a schema.
$.paths[*][post,put,patch].requestBody.content.application/json
error
response-2xx-required
Every operation must define 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[*]
info
response-json-content
2xx responses should provide application/json content.
$.paths[*][get,post,put,delete,patch].responses[200,201].content
info
schema-property-typed
Schema properties should declare a type, $ref, or composition.
$.components.schemas[*].properties[*]
info
schema-property-camelcase
Schema property names should be camelCase (PXS convention).
$.components.schemas[*].properties.*~
info
security-schemes-defined
components.securitySchemes should be defined where the API requires auth.
$.components
info
security-scheme-described
Each security scheme should have a description.
$.components.securitySchemes[*]
error
get-no-request-body
GET operations must not declare a request body.
$.paths[*].get
warn
delete-no-request-body
DELETE operations should not declare a request body.
$.paths[*].delete