Amadeus · API Governance Rules
Amadeus API Rules
Spectral linting rules defining API design standards and conventions for Amadeus.
32 Rules
error 6
warn 14
info 12
Rule Categories
global
iata
info
microcks
operation
parameter
paths
response
schema
security
servers
spec
swagger
tag
Rules
error
info-title-required
API title must be present.
$.info
warn
info-description-required
API description must be present and informative.
$.info
warn
info-version-semver
API version should follow semantic versioning.
$.info.version
info
info-title-amadeus-suffix
API title should end with "API" (e.g. "Flight Offers Search API", "Hotel Search API").
$.info.title
warn
spec-version-allowed
Spec must be Swagger 2.0 or OpenAPI 3.x — both are observed across the Amadeus catalog.
$
error
servers-https-only
Amadeus exposes APIs over HTTPS only.
$.servers[*].url
error
swagger-schemes-https
Swagger 2.0 schemes must include "https".
$.schemes
warn
swagger-host-amadeus-domain
Swagger 2.0 host should be test.api.amadeus.com or api.amadeus.com.
$.host
warn
servers-amadeus-domain
OpenAPI 3 server URLs should target test.api.amadeus.com or api.amadeus.com.
$.servers[*].url
warn
paths-versioned-base
Paths or basePath should be versioned (e.g. /v1, /v2, /v3).
$.basePath
warn
paths-kebab-case-segments
Path segments should use lowercase kebab-case (Amadeus convention).
$.paths
error
paths-no-trailing-slash
Paths must not end with a trailing slash.
$.paths[*]~
error
operation-operationid-required
Every operation must have an operationId.
$.paths[*][get,post,put,patch,delete]
warn
operation-operationid-camelcase
operationId should be camelCase (Amadeus convention — e.g. getFlightOffers, createOrder).
$.paths[*][get,post,put,patch,delete].operationId
warn
operation-summary-required
Every operation must have a summary.
$.paths[*][get,post,put,patch,delete]
info
operation-summary-amadeus-prefix
Operation summaries should be prefixed with "Amadeus" (Title Case convention from title-case-summaries skill).
$.paths[*][get,post,put,patch,delete].summary
warn
operation-tags-required
Every operation should have at least one tag to support capability bucketing.
$.paths[*][get,post,put,patch,delete]
info
operation-description-recommended
Operations should have a description in addition to the summary.
$.paths[*][get,post,put,patch,delete]
warn
parameter-description-required
Every parameter should have a description.
$.paths[*][get,post,put,patch,delete].parameters[*]
warn
parameter-name-camelcase
Parameter names should be camelCase (Amadeus convention — e.g. originLocationCode, departureDate, hotelIds).
$.paths[*][get,post,put,patch,delete].parameters[?(@.in!='body' && @.in!='header')].name
info
iata-code-pattern
IATA-code-style query parameters (originLocationCode, destinationLocationCode, airlineCode, carrierCode) must be uppercase 2-3 letter strings.
$.paths[*][get,post,put,patch,delete].parameters[?(@.name=='originLocationCode' || @.name=='destinationLocationCode' || @.name=='airlineCode' || @.name=='carrierCode' || @.name=='iataCode')]
error
response-success-required
Every operation must define at least one 2xx response.
$.paths[*][get,post,put,patch,delete].responses
info
response-400-defined
Operations should document 400 Bad Request responses.
$.paths[*][get,post,put,patch,delete].responses
info
response-401-defined
Operations should document 401 Unauthorized responses (OAuth2 required).
$.paths[*][get,post,put,patch,delete].responses
info
response-500-defined
Operations should document 500 Internal Server Error responses.
$.paths[*][get,post,put,patch,delete].responses
info
response-content-amadeus-mediatype
Amadeus uses the application/vnd.amadeus+json media type alongside application/json — at least one must be declared.
$.produces
warn
schema-property-camelcase
Schema property names should be camelCase (Amadeus convention — e.g. originLocationCode, departureDate).
$..properties[*]~
warn
schema-type-defined
Every schema must declare a type or use $ref / oneOf / anyOf / allOf.
$.definitions[*]
info
security-oauth2-defined
Specs that require authentication should reference an OAuth2 security scheme (Amadeus uses client_credentials).
$.components.securitySchemes
info
global-tags-defined
Global tags array should be defined so operations can be bucketed into capabilities.
$.tags
info
tag-description-required
Each global tag should have a description.
$.tags[*]
info
microcks-operation-required
Every operation should carry x-microcks-operation for Microcks mock-server compatibility.
$.paths[*][get,post,put,patch,delete]