GamerPower · API Governance Rules
GamerPower API Rules
Spectral linting rules defining API design standards and conventions for GamerPower.
35 Rules
error 17
warn 17
info 1
Rule Categories
info
openapi
operation
parameter
paths
response
schema
security
servers
tag
tags
Rules
error
info-title-format
API title must begin with "GamerPower".
$.info.title
error
info-description-required
API info.description is required and must be at least 40 characters.
$.info
error
info-version-required
API info.version is required.
$.info
warn
info-contact-required
API info.contact must reference GamerPower.
$.info.contact
warn
openapi-version-3-1
Use OpenAPI 3.1.x.
$.openapi
error
servers-required
At least one server must be declared.
$
error
servers-https-only
All server URLs must use HTTPS.
$.servers[*].url
warn
servers-gamerpower-host
Servers must use the canonical www.gamerpower.com host.
$.servers[*].url
warn
paths-kebab-or-lowercase
Path segments must be lowercase (no uppercase letters or underscores).
$.paths[*]~
error
paths-no-trailing-slash
Paths must not end with a trailing slash.
$.paths[*]~
error
paths-no-query-string
Paths must not contain query strings.
$.paths[*]~
error
operation-operationId-required
Every operation must declare an operationId.
#Operation
warn
operation-operationId-camelcase
operationId must be camelCase.
#Operation.operationId
error
operation-summary-required
Every operation must have a summary.
#Operation
warn
operation-summary-gamerpower-prefix
Operation summaries must begin with "GamerPower".
#Operation.summary
warn
operation-description-required
Every operation must have a description.
#Operation
error
operation-tags-required
Every operation must declare at least one tag.
#Operation
error
operation-get-only
The GamerPower API is read-only; only GET methods are permitted.
#PathItem
warn
tags-global-array
Global tags array must be defined with descriptions.
$
warn
tag-title-case
Tag names must use Title Case.
$.tags[*].name
warn
tag-description-required
Every tag must have a description.
$.tags[*]
warn
parameter-description-required
Every parameter must declare a description.
#Operation.parameters[*]
error
parameter-schema-required
Every parameter must declare a schema.
#Operation.parameters[*]
warn
parameter-sort-by-kebab
The sort key parameter must be exactly `sort-by` (kebab-case) to match the live API.
#Operation.parameters[?(@.in == 'query')].name
error
response-200-required
Every operation must declare a 200 response.
#Operation.responses
error
response-description-required
Every response must include a description.
#Operation.responses[*]
warn
response-json-content
2xx and 4xx responses must define application/json content.
#Operation.responses['200'].content#Operation.responses['201'].content#Operation.responses['404'].content#Operation.responses['500'].content
warn
schema-description-required
Every component schema must have a description.
$.components.schemas[*]
warn
schema-status-envelope
The StatusEnvelope schema must include both `status` and `status_message`.
$.components.schemas.StatusEnvelope.properties
warn
schema-giveaway-required-fields
The Giveaway schema must declare its core identifying and lifecycle fields as required.
$.components.schemas.Giveaway
error
schema-platform-enum-defined
The Platform schema must enumerate the supported platform slugs.
$.components.schemas.Platform
error
schema-giveaway-type-enum
The GiveawayType schema must enumerate game, loot, beta.
$.components.schemas.GiveawayType
error
schema-sortby-enum
The SortBy schema must enumerate date, value, popularity.
$.components.schemas.SortBy
warn
security-none-required
The GamerPower API is fully open and must not declare a security scheme.
$
info
operation-microcks-extension
Operations should include x-microcks-operation for mock server compatibility.
#Operation