Basiq · API Governance Rules
Basiq API Rules
Spectral linting rules defining API design standards and conventions for Basiq.
22 Rules
error 6
warn 15
info 1
Rule Categories
basiq
error
no
path
schema
security
servers
Rules
error
basiq-bearer-auth-required
All protected operations must use BearerAuth security.
$.paths[?(!@property.match('token'))].*.security
error
basiq-operation-id-required
All operations must have an operationId.
$.paths.*.*
warn
basiq-operation-id-camel-case
Operation IDs must use camelCase.
$.paths.*.*.operationId
error
basiq-summary-required
All operations must have a summary.
$.paths.*.*
warn
basiq-summary-title-case
Operation summaries must use Title Case.
$.paths.*.*.summary
error
basiq-tags-required
All operations must be tagged.
$.paths.*.*
warn
basiq-description-required
All operations must have a description.
$.paths.*.*
error
basiq-200-response-required
All GET operations must define a 200 response.
$.paths.*.get.responses
warn
basiq-404-response-required
Parameterized path operations should define a 404 response.
$.paths.*.get.responses
warn
basiq-user-path-prefix
User-scoped resource paths should be nested under /users/{userId}.
$.paths[*]~
warn
basiq-response-schema-ref
Responses should reference schemas using $ref rather than inline definitions.
$.paths.*.*.responses.*.content.application/json.schema
warn
basiq-schema-description-required
All schema properties should have descriptions.
$.components.schemas.*.properties.*
warn
basiq-info-contact-required
API info must include contact details.
$.info
error
basiq-server-url-https
Server URLs must use HTTPS.
$.servers.*.url
warn
basiq-204-delete-response
DELETE operations should return 204 No Content.
$.paths.*.delete.responses
warn
servers-expected-domain
Server URLs should be on the basiq.io domain.
$.servers[*].url
warn
path-params-casing
Path parameters should be camelCase (the dominant convention in this API).
$.paths[*].parameters[?(@.in=='path')].name
warn
schema-names-casing
Component schema names should be PascalCase (the dominant convention in this API).
$.components.schemas
info
schema-properties-casing
Schema properties should be snake_case (the dominant convention in this API).
$.components.schemas[*].properties
warn
security-schemes-defined
Security schemes should be defined in components.
$.components
warn
error-schema-defined
A shared error schema (ErrorResponse) should be defined for error payloads.
$.components.schemas
warn
no-empty-descriptions
Descriptions must not be empty strings.
$..description