Maxar Technologies · API Governance Rules

Maxar Technologies API Rules

Spectral linting rules defining API design standards and conventions for Maxar Technologies.

8 Rules error 2 warn 5 info 1
View Rules File View on GitHub

Rule Categories

maxar

Rules

warn
maxar-info-contact
Every Maxar API spec must declare an info.contact
$.info
warn
maxar-info-license
Every Maxar API spec must declare an info.license
$.info
error
maxar-servers-https
Maxar server URLs must use https
$.servers[*].url
warn
maxar-bearer-auth
Maxar APIs (other than the token endpoint) require bearer auth
$.components.securitySchemes
warn
maxar-operation-summary-title-case
Operation summaries must use Title Case
$.paths.*.*.summary
error
maxar-operation-id-camel
Operation IDs must be camelCase
$.paths.*.*.operationId
warn
maxar-tag-title-case
Tags must use Title Case
$.tags[*].name
info
maxar-error-schema
Operations should declare 400/401 error responses
$.paths.*.*.responses

Spectral Ruleset

Raw ↑
extends: spectral:oas
rules:
  maxar-info-contact:
    description: Every Maxar API spec must declare an info.contact
    given: $.info
    severity: warn
    then:
      field: contact
      function: truthy
  maxar-info-license:
    description: Every Maxar API spec must declare an info.license
    given: $.info
    severity: warn
    then:
      field: license
      function: truthy
  maxar-servers-https:
    description: Maxar server URLs must use https
    given: $.servers[*].url
    severity: error
    then:
      function: pattern
      functionOptions:
        match: "^https://"
  maxar-bearer-auth:
    description: Maxar APIs (other than the token endpoint) require bearer auth
    given: $.components.securitySchemes
    severity: warn
    then:
      function: truthy
  maxar-operation-summary-title-case:
    description: Operation summaries must use Title Case
    given: $.paths.*.*.summary
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: "^[A-Z][A-Za-z0-9]*( [A-Z][A-Za-z0-9]*)*$"
  maxar-operation-id-camel:
    description: Operation IDs must be camelCase
    given: $.paths.*.*.operationId
    severity: error
    then:
      function: pattern
      functionOptions:
        match: "^[a-z][a-zA-Z0-9]*$"
  maxar-tag-title-case:
    description: Tags must use Title Case
    given: $.tags[*].name
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: "^[A-Z][A-Za-z0-9]*( [A-Z][A-Za-z0-9]*)*$"
  maxar-error-schema:
    description: Operations should declare 400/401 error responses
    given: $.paths.*.*.responses
    severity: info
    then:
      function: schema
      functionOptions:
        schema:
          type: object