Adidas · API Governance Rules
Adidas API Rules
Spectral linting rules defining API design standards and conventions for Adidas.
30 Rules
error 20
warn 9
Published by Adidas
Served by the provider at https://github.com/adidas/api-guidelines/blob/222b294d13872d55befbf61b3ee60998fcb9e57b/.spectral.yml; the copy below was fetched from there.
Rule Categories
adidas
Rules
warn
adidas-paths-kebab-case
All YAML/JSON paths MUST follow kebab-case
$.paths[*]~
warn
adidas-path-parameters-camelCase-alphanumeric
Path parameters MUST follow camelCase
$..parameters[?(@.in == 'path')].name
error
adidas-definitions-camelCase-alphanumeric
All YAML/JSON definitions MUST follow fields-camelCase and be ASCII alphanumeric characters or `_` or `$`.
$.definitions[*]~
error
adidas-properties-camelCase-alphanumeric
All JSON Schema properties MUST follow fields-camelCase and be ASCII alphanumeric characters or `_` or `$`.
$.definitions..properties[*]~
error
adidas-headers-hyphenated-pascal-case
All `HTTP` headers MUST use `Hyphenated-Pascal-Case` notation
$..parameters[?(@.in == 'header')].name
error
adidas-oas2-protocol-https-only
ALL requests MUST go through `https` protocol only
$
warn
adidas-oas2-request-support-json
Every request SHOULD support `application/json` media type
$..consumes
error
adidas-oas2-example-exists-in-parameters
All models MUST have a valid example.
$..parameters..[?(@.in == 'body' && (@.example || @.schema.$ref))]
error
adidas-oas2-response-success-hal
All success responses MUST be of media type `application/hal+json`
$.paths..responses[?( @property >= 200 && @property < 300 && @property != 204)]
error
adidas-oas2-response-error-problem
All error responses MUST be of media type `application/problem+json`
$.paths..responses[?( @property >= 400 && @property < 600 )]
error
adidas-oas3-request-support-json
Every request MUST support `application/json` media type
$.paths.[*].requestBody.content[?(@property.indexOf('json') === -1)]^
error
adidas-oas3-protocol-https-only
ALL requests MUST go through `https` protocol only
$.servers..url
error
adidas-oas3-response-success-hal
All success responses MUST be of media type `application/hal+json`
$.paths..responses[?( @property >= 201 && @property < 300 && @property != 204)].content[*]~
error
adidas-oas3-response-success-OK
All success responses MUST be of media type `application/hal+json` or `application/problem+json`
$.paths..responses[?( @property == 200 )].content[*]~
error
adidas-oas3-response-success-hal-body
All success responses MUST follow `application/hal+json` schema
$.paths..responses[?( @property == 200 && @property < 300 && @property != 204)].content[?(@property === "application/hal+json")]
error
adidas-oas3-no-get-request-body
GET requests MUST NOT have a request body.
$.paths[*].get.requestBody
error
adidas-oas3-not-post-to-get-info
POST requests SHOULD NOT be used for retrieving information. Use GET instead.
$.paths[*].post
error
adidas-oas3-put-with-request-body
PUT requests MUST have a request body.
$.paths[*].put
error
adidas-oas3-delete-with-request-body
DELETE requests MUST NOT have a request body.
$.paths[*].delete.requestBody
warn
adidas-oas3-no-verbs-in-paths
API paths MUST be resource-focused and MUST NOT include verbs like 'get', 'update', 'create', or 'delete'.
$.paths[*]~
warn
adidas-oas3-real-like-examples
API design SHOULD include real-like examples for request and response definitions.
$..[?(@.example || @.examples)]
error
adidas-oas3-stable-semantic-version
The API contract MUST have a stable version and MUST follow semantic versioning (e.g., '1.0.0'). Words like 'SNAPSHOT' or 'RELEASE' are not allowed.
$.info.version
error
adidas-oas3-security-section-required
The API contract MUST include a 'security' section at the root level.
$
error
adidas-oas3-components-required
The API contract MUST include a 'components' section.
$
error
adidas-oas3-security-schemes-required
The API contract MUST include a 'securitySchemes' subsection under the 'components' section.
$.components
warn
adidas-oas3-x-leanixid-required
The API contract SHOULD include a custom field 'x-leanixid' in the 'info' section.
$.info
warn
adidas-oas3-x-leanixid-uuid
The API contract SHOULD include a custom field 'x-leanixid' containing a valid UUID.
$.info.x-leanixid
warn
adidas-oas3-x-gateway-required
The API contract SHOULD include a custom field 'x-gateway' in the 'info' section.
$.info
warn
adidas-oas3-x-gateway-required-enumeration
The 'x-gateway' property, if present, MUST have a value in the enumeration: kong, nginx, aws, akamai, sap, other.
$
hint
adidas-oas3-hypermedia-links-required
The API contract MAY include hypermedia links to represent the state of resources and be navigable.
$.paths[*][*].responses[*]
Spectral Ruleset
Work with this as data
Every ruleset here is available over the APIs.io API and to AI agents over MCP.