Amazon Health Dashboard · API Governance Rules

Amazon Health Dashboard API Rules

Spectral linting rules defining API design standards and conventions for Amazon Health Dashboard.

7 Rules error 4 warn 2 info 1
View Rules File View on GitHub

Rule Categories

info microcks operation response

Rules

warn
info-title-format
$.info.title
error
info-description-required
$.info
error
operation-summary-required
$.paths[*][get,post,put,patch,delete]
error
operation-id-required
$.paths[*][get,post,put,patch,delete]
warn
operation-summary-company-prefix
$.paths[*][get,post,put,patch,delete].summary
error
response-success-required
$.paths[*][get,post,put,patch,delete].responses
info
microcks-operation-extension
$.paths[*][get,post,put,patch,delete]

Spectral Ruleset

Raw ↑
rules:
  info-title-format:
    severity: warn
    given: "$.info.title"
    then:
      function: pattern
      functionOptions:
        match: "^Amazon Health|^AWS Health"
  info-description-required:
    severity: error
    given: "$.info"
    then:
      field: description
      function: truthy
  operation-summary-required:
    severity: error
    given: "$.paths[*][get,post,put,patch,delete]"
    then:
      field: summary
      function: truthy
  operation-id-required:
    severity: error
    given: "$.paths[*][get,post,put,patch,delete]"
    then:
      field: operationId
      function: truthy
  operation-summary-company-prefix:
    severity: warn
    given: "$.paths[*][get,post,put,patch,delete].summary"
    then:
      function: pattern
      functionOptions:
        match: "^Amazon Health Dashboard"
  response-success-required:
    severity: error
    given: "$.paths[*][get,post,put,patch,delete].responses"
    then:
      function: schema
      functionOptions:
        schema:
          type: object
          anyOf:
            - required: ["200"]
            - required: ["201"]
            - required: ["204"]
  microcks-operation-extension:
    severity: info
    given: "$.paths[*][get,post,put,patch,delete]"
    then:
      field: x-microcks-operation
      function: truthy