Amadeus Solutions · API Governance Rules

Amadeus Solutions API Rules

Spectral linting rules defining API design standards and conventions for Amadeus Solutions.

15 Rules error 10 warn 4 info 1
View Rules File View on GitHub

Rule Categories

get info operation parameter paths response schema security servers

Rules

error
info-title-required
API title must be present.
$.info
error
info-description-required
API must have a description.
$.info
error
info-version-required
API version must be present.
$.info
error
servers-https
Server URLs must use HTTPS.
$.servers[*].url
error
operation-summary-required
Every operation must have a summary.
$.paths[*][get,post,put,patch,delete]
warn
operation-summary-amadeus-prefix
Operation summaries must start with "Amadeus".
$.paths[*][get,post,put,patch,delete].summary
error
operation-id-required
Every operation must have an operationId.
$.paths[*][get,post,put,patch,delete]
error
operation-tags-required
Every operation must have at least one tag.
$.paths[*][get,post,put,patch,delete]
warn
parameter-description-required
Every parameter must have a description.
$.paths[*][*].parameters[*]
error
response-description-required
Every response must have a description.
$.paths[*][*].responses[*]
warn
response-401-required
Operations should define a 401 response.
$.paths[*][get,post].responses
error
get-no-request-body
GET operations must not have a request body.
$.paths[*].get
info
schema-description
Top-level schemas should have descriptions.
$.components.schemas[*]
warn
security-schemes-defined
Security schemes should be defined.
$.components
error
paths-no-trailing-slash
Paths must not have trailing slashes.
$.paths

Spectral Ruleset

Raw ↑
rules:
  info-title-required:
    description: API title must be present.
    severity: error
    given: $.info
    then:
      field: title
      function: truthy
  info-description-required:
    description: API must have a description.
    severity: error
    given: $.info
    then:
      field: description
      function: truthy
  info-version-required:
    description: API version must be present.
    severity: error
    given: $.info
    then:
      field: version
      function: truthy
  servers-https:
    description: Server URLs must use HTTPS.
    severity: error
    given: $.servers[*].url
    then:
      function: pattern
      functionOptions:
        match: "^https://"
  operation-summary-required:
    description: Every operation must have a summary.
    severity: error
    given: $.paths[*][get,post,put,patch,delete]
    then:
      field: summary
      function: truthy
  operation-summary-amadeus-prefix:
    description: Operation summaries must start with "Amadeus".
    severity: warn
    given: $.paths[*][get,post,put,patch,delete].summary
    then:
      function: pattern
      functionOptions:
        match: "^Amadeus "
  operation-id-required:
    description: Every operation must have an operationId.
    severity: error
    given: $.paths[*][get,post,put,patch,delete]
    then:
      field: operationId
      function: truthy
  operation-tags-required:
    description: Every operation must have at least one tag.
    severity: error
    given: $.paths[*][get,post,put,patch,delete]
    then:
      field: tags
      function: truthy
  parameter-description-required:
    description: Every parameter must have a description.
    severity: warn
    given: $.paths[*][*].parameters[*]
    then:
      field: description
      function: truthy
  response-description-required:
    description: Every response must have a description.
    severity: error
    given: $.paths[*][*].responses[*]
    then:
      field: description
      function: truthy
  response-401-required:
    description: Operations should define a 401 response.
    severity: warn
    given: $.paths[*][get,post].responses
    then:
      field: '401'
      function: truthy
  get-no-request-body:
    description: GET operations must not have a request body.
    severity: error
    given: $.paths[*].get
    then:
      field: requestBody
      function: falsy
  schema-description:
    description: Top-level schemas should have descriptions.
    severity: info
    given: $.components.schemas[*]
    then:
      field: description
      function: truthy
  security-schemes-defined:
    description: Security schemes should be defined.
    severity: warn
    given: $.components
    then:
      field: securitySchemes
      function: truthy
  paths-no-trailing-slash:
    description: Paths must not have trailing slashes.
    severity: error
    given: $.paths
    then:
      function: pattern
      functionOptions:
        notMatch: "/$"