BBVA · API Governance Rules
BBVA — apicheck rules
Spectral linting rules defining API design standards and conventions for BBVA.
23 Rules
error 9
warn 9
Published by BBVA
Served by the provider at https://github.com/BBVA/apicheck/blob/8f455e8d3863c56ed75fc5d68df0a52830c7749b/tools-edge/oas-checker/spectral.yml; the copy below was fetched from there.
Rule Categories
array
has
hint
missing
no
number
patch
paths
request
response
servers
string
use
Rules
warn
paths-kebab-case
Paths should be kebab-case.
$.paths[*]~
hint
request-headers-pascal-case
Headers should be pascal-case.
$.[parameters][?(@.in=="header")].name
hint
response-headers-pascal-case
Headers should be pascal-case.
$.[responses][*].headers.*~
error
no-forbidden-headers
OAS do not allow using Authorization, Content-Type and Accept in the spec.
$..parameters[?(@.in == 'header')].name$.[responses][*].headers.*~
warn
no-x-headers-request
All 'HTTP' headers SHOULD NOT include 'X-' headers (https://tools.ietf.org/html/rfc6648).
$..parameters[?(@.in == 'header')].name
warn
no-x-headers-response
All 'HTTP' headers SHOULD NOT include 'X-' headers (https://tools.ietf.org/html/rfc6648).
$.[responses][*].headers.*~
error
servers-description
Servers must have a description.
$.servers[*]
error
servers-use-https
Servers must use https
$.servers[?(@["x-sandbox"] != true)]
error
has-termsOfService
API MUST reference the URL of the Terms of Service in #/info/termsOfService
$
error
has-contact
API MUST reference a contact, either url or email in #/info/contact
$
error
use-semver
$.info.version
error
no-swagger-2
Swagger 2 files are not allowed. Use OpenAPI >= 3.0
$
error
patch-media-type
application/json is not an appropriate media-type for PATCH.
$.[patch][requestBody][content]
error
use-problem-json-for-errors
Error responses should support [RFC 7807](https://tools.ietf.org/html/rfc7807)
$.paths.[*].responses[?(@property.match(/^(4|5|default)/))].content.*~
hint
use-problem-schema
WARN: This rule is under implementation. Your problem schema doesn't seem to match RFC7807. Are you sure it is ok?
$.paths.[*].responses[?(@property.match(/^(4|5|default)/))][[schema]]
hint
hint-problem-schema
Your problem schema doesn't seem to match RFC7807. Are you sure it is ok?
$.[responses][?(@property.match(/^(4|5|default)/))][[schema]][properties].*~
warn
missing-retry-after
APIs should use Retry-After on 429 and 503 responses.
$.[responses][?(@property == "429" || @property == "503" )][headers]
warn
missing-ratelimit
APIs should use ratelimit headers at least on successful responses.
$.[responses][?(@property[0] == "2" )][headers]
warn
response-with-json-object
$.[responses][*][content][?(@property.match("json$"))][schema]
warn
array-boundaries
Arrays should be limited.
$.[?(@.type=="array")]
warn
number-boundaries
Schema of type number or integer must specify a maximum and a minimum.
$.[?(@.type=="number")]$.[?(@.type=="integer")]
warn
string-maxlength
String length should be limited.
$.[?(@.type=="string" && !@.enum )]
hint
string-pattern-or-format-or-enum
String values should be constrained.
$.[[?( @.type == "string" && !@.enum )]]
Spectral Ruleset
Work with this as data
Every ruleset here is available over the APIs.io API and to AI agents over MCP.