Airbus OneAtlas · API Governance Rules

Airbus OneAtlas API Rules

Spectral linting rules defining API design standards and conventions for Airbus OneAtlas.

12 Rules error 4 warn 8
View Rules File View on GitHub

Rule Categories

oneatlas

Rules

warn
oneatlas-operation-summary-title-case
All operation summaries must use Title Case
$.paths[*][get,post,put,patch,delete]
error
oneatlas-require-operation-id
All operations must have an operationId
$.paths[*][get,post,put,patch,delete]
warn
oneatlas-require-operation-tags
All operations must have tags
$.paths[*][get,post,put,patch,delete]
error
oneatlas-require-response-200
GET operations must define a 200 response
$.paths[*].get
warn
oneatlas-schema-title-required
Component schemas must have a title
$.components.schemas[*]
error
oneatlas-require-api-key-security
All operations must include API key security
$
error
oneatlas-require-server-url
API must define at least one server
$
warn
oneatlas-require-info-description
API info must have a description
$.info
warn
oneatlas-require-external-docs
API should reference external documentation
$
warn
oneatlas-require-operation-description
All operations must have a description
$.paths[*][get,post,put,patch,delete]
warn
oneatlas-geometry-type-required
Geometry schemas must specify a type field
$.components.schemas[?(@.description =~ /.*[Gg]eometr.*/)]
warn
oneatlas-catalog-item-required-fields
CatalogItem schema must include id and geometry
$.components.schemas.CatalogItem.properties

Spectral Ruleset

Raw ↑
rules:
  oneatlas-operation-summary-title-case:
    description: All operation summaries must use Title Case
    severity: warn
    given: $.paths[*][get,post,put,patch,delete]
    then:
      field: summary
      function: pattern
      functionOptions:
        match: ^[A-Z]
  oneatlas-require-operation-id:
    description: All operations must have an operationId
    severity: error
    given: $.paths[*][get,post,put,patch,delete]
    then:
      field: operationId
      function: truthy
  oneatlas-require-operation-tags:
    description: All operations must have tags
    severity: warn
    given: $.paths[*][get,post,put,patch,delete]
    then:
      field: tags
      function: truthy
  oneatlas-require-response-200:
    description: GET operations must define a 200 response
    severity: error
    given: $.paths[*].get
    then:
      field: responses.200
      function: truthy
  oneatlas-schema-title-required:
    description: Component schemas must have a title
    severity: warn
    given: $.components.schemas[*]
    then:
      field: title
      function: truthy
  oneatlas-require-api-key-security:
    description: All operations must include API key security
    severity: error
    given: $
    then:
      field: security
      function: truthy
  oneatlas-require-server-url:
    description: API must define at least one server
    severity: error
    given: $
    then:
      field: servers
      function: truthy
  oneatlas-require-info-description:
    description: API info must have a description
    severity: warn
    given: $.info
    then:
      field: description
      function: truthy
  oneatlas-require-external-docs:
    description: API should reference external documentation
    severity: warn
    given: $
    then:
      field: externalDocs
      function: truthy
  oneatlas-require-operation-description:
    description: All operations must have a description
    severity: warn
    given: $.paths[*][get,post,put,patch,delete]
    then:
      field: description
      function: truthy
  oneatlas-geometry-type-required:
    description: Geometry schemas must specify a type field
    severity: warn
    given: $.components.schemas[?(@.description =~ /.*[Gg]eometr.*/)]
    then:
      field: properties.type
      function: truthy
  oneatlas-catalog-item-required-fields:
    description: CatalogItem schema must include id and geometry
    severity: warn
    given: $.components.schemas.CatalogItem.properties
    then:
      function: schema
      functionOptions:
        schema: {}