Analog Devices · API Governance Rules

Analog Devices API Rules

Spectral linting rules defining API design standards and conventions for Analog Devices.

4 Rules error 4
View Rules File View on GitHub

Rule Categories

info operation servers

Rules

error
info-description-required
All API info objects must have descriptions
$.info
error
operation-summary-required
All operations must have summaries
$.paths[*][get,post,put,patch,delete]
error
operation-operationid-required
All operations must have operationIds
$.paths[*][get,post,put,patch,delete]
error
servers-https-only
All servers must use HTTPS
$.servers[*].url

Spectral Ruleset

analog-devices-spectral-rules.yml Raw ↑
rules:
  info-description-required:
    description: All API info objects must have descriptions
    severity: error
    given: "$.info"
    then:
      field: description
      function: truthy

  operation-summary-required:
    description: All operations must have summaries
    severity: error
    given: "$.paths[*][get,post,put,patch,delete]"
    then:
      field: summary
      function: truthy

  operation-operationid-required:
    description: All operations must have operationIds
    severity: error
    given: "$.paths[*][get,post,put,patch,delete]"
    then:
      field: operationId
      function: truthy

  servers-https-only:
    description: All servers must use HTTPS
    severity: error
    given: "$.servers[*].url"
    then:
      function: pattern
      functionOptions:
        match: "^https://"