Scalar · API Governance Rules
Scalar API Rules
Spectral linting rules defining API design standards and conventions for Scalar.
16 Rules
error 4
warn 12
Rule Categories
scalar
Rules
error
scalar-info-title
API title must be present and non-empty.
$.info
warn
scalar-info-description
API description should provide meaningful context.
$.info
warn
scalar-info-version
API version must follow semver (major.minor.patch).
$.info.version
error
scalar-operation-summary
Every operation must have a summary.
$.paths[*][get,post,put,patch,delete,options,head]
warn
scalar-operation-summary-title-case
Operation summaries must use Title Case.
$.paths[*][get,post,put,patch,delete][summary]
error
scalar-operation-operationid
Every operation must have a unique operationId.
$.paths[*][get,post,put,patch,delete,options,head]
warn
scalar-operation-operationid-kebab
operationId should use camelCase or kebab-case.
$.paths[*][get,post,put,patch,delete].operationId
warn
scalar-operation-tags
Every operation must have at least one tag.
$.paths[*][get,post,put,patch,delete]
warn
scalar-path-kebab-case
All path segments must use lowercase kebab-case.
$.paths[*]~
warn
scalar-no-trailing-slash
Paths must not have trailing slashes.
$.paths[*]~
error
scalar-operation-responses
Every operation must define at least one response.
$.paths[*][get,post,put,patch,delete]
warn
scalar-operation-success-response
GET operations should define a 200 response.
$.paths[*].get
warn
scalar-schema-description
All named schema components should have descriptions.
$.components.schemas[*]
warn
scalar-parameter-description
All parameters should have descriptions.
$.paths[*][*].parameters[*]
warn
scalar-security-schemes-defined
If security is used in operations, securitySchemes must be defined.
$
warn
scalar-servers-present
At least one server must be defined.
$