YGOPRODeck · API Governance Rules
YGOPRODeck API Rules
Spectral linting rules defining API design standards and conventions for YGOPRODeck.
43 Rules
error 20
warn 16
info 7
Authorship not recorded
No authorship marker is recorded for this file. It is not presented as the provider's; it was most likely written by an API Evangelist pass before outputs were stamped.
Rule Categories
external
get
global
info
microcks
no
openapi
operation
parameter
paths
rate
response
schema
servers
tags
Rules
warn
info-title-ygoprodeck-prefix
API title must start with "YGOPRODeck".
$.info.title
error
info-description-required
API description is required and should explain scope and rate limits.
$.info
error
info-version-required
API version must be specified (YGOPRODeck convention is `v7`).
$.info
warn
info-contact-required
A contact block must be present so consumers can reach the API provider.
$.info
warn
info-license-required
License block must be present.
$.info
warn
info-terms-of-service-required
A terms-of-service URL is required (the API Guide link).
$.info
error
openapi-version-3-0
OpenAPI document must use 3.0.x.
$.openapi
error
servers-defined
At least one server must be defined.
$
error
servers-https-only
Servers must use HTTPS.
$.servers[*].url
warn
servers-ygoprodeck-host
Production server must be db.ygoprodeck.com.
$.servers[*].url
warn
servers-description-required
Each server must have a description.
$.servers[*]
error
paths-lowercase
Path segments must be lowercase.
$.paths[*]~
info
paths-php-suffix
YGOPRODeck v7 endpoints end with `.php`.
$.paths[*]~
error
paths-no-trailing-slash
Paths must not end with a trailing slash.
$.paths[*]~
error
paths-no-query-string
Path keys must not include a query string — query params belong in `parameters`.
$.paths[*]~
error
operation-summary-required
Every operation must have a summary.
$.paths[*][get,post,put,patch,delete]
error
operation-description-required
Every operation must have a description.
$.paths[*][get,post,put,patch,delete]
error
operation-id-required
Every operation must declare an operationId.
$.paths[*][get,post,put,patch,delete]
error
operation-id-camel-case
operationId must be camelCase.
$.paths[*][get,post,put,patch,delete].operationId
warn
operation-id-verb-prefix
operationId should start with a CRUD-style verb (get, list, search, create, update, delete).
$.paths[*][get,post,put,patch,delete].operationId
warn
operation-summary-ygoprodeck-prefix
Operation summaries should start with `YGOPRODeck`.
$.paths[*][get,post,put,patch,delete].summary
error
operation-tags-required
Every operation must declare at least one tag.
$.paths[*][get,post,put,patch,delete]
error
global-tags-defined
A global `tags` array must be declared at the root of the spec.
$
warn
tags-have-description
Each global tag must include a description.
$.tags[*]
warn
tags-title-case
Tag names should be Title Case (e.g. `Cards`, `Card Sets`, `Reference Data`).
$.tags[*].name
error
parameter-description-required
Every parameter must have a description.
$.paths[*][get,post,put,patch,delete].parameters[*]
error
parameter-schema-required
Every parameter must declare a schema with a type.
$.paths[*][get,post,put,patch,delete].parameters[*]
warn
parameter-snake-case
Query parameter names must be snake_case (matches YGOPRODeck native style).
$.paths[*][get,post,put,patch,delete].parameters[?(@.in=='query')].name
info
parameter-example-encouraged
Parameters should include an `example` value to help client developers.
$.paths[*][get,post,put,patch,delete].parameters[*]
error
response-200-required
Every operation must define a `200` response.
$.paths[*][get,post,put,patch,delete].responses
error
response-description-required
Every response must include a description.
$.paths[*][get,post,put,patch,delete].responses[*]
warn
response-application-json
Success responses must use `application/json`.
$.paths[*][get,post,put,patch,delete].responses.200.content
info
response-400-for-filterable-operations
Operations that accept user-supplied filter parameters should declare a `400` response.
$.paths[*][get,post,put,patch,delete][?(@.parameters)]
warn
schema-property-snake-case
Schema property names must be snake_case (matches YGOPRODeck native field naming).
$.components.schemas[*].properties[*]~
warn
schema-description-required
Every top-level schema in `components.schemas` should have a description.
$.components.schemas[*]
error
schema-type-required
Every top-level schema must declare a `type`.
$.components.schemas[*]
warn
no-security-schemes
YGOPRODeck v7 is unauthenticated; no security schemes should be declared.
$.components.securitySchemes
warn
no-global-security
YGOPRODeck v7 has no global security; the `security` array should be empty or absent.
$.security
error
get-only
YGOPRODeck v7 exposes GET-only endpoints. Other HTTP methods should not appear.
$.paths[*]
info
external-docs-encouraged
Provide `externalDocs` pointing at the YGOPRODeck API Guide.
$
info
external-docs-points-at-api-guide
externalDocs.url should point at the YGOPRODeck API Guide.
$.externalDocs.url
info
rate-limit-noted-in-description
The API description should mention the documented rate limit.
$.info.description
info
microcks-operation-extension
Each operation should declare an `x-microcks-operation` block so the spec is mock-server ready.
$.paths[*][get,post,put,patch,delete]
Spectral Ruleset
Work with this as data
Every ruleset here is available over the APIs.io API and to AI agents over MCP.