Deepgram · API Governance Rules

Deepgram API Rules

Spectral linting rules defining API design standards and conventions for Deepgram.

5 Rules error 1 warn 4
View Rules File View on GitHub

Rule Categories

deepgram

Rules

warn
deepgram-info-contact
API info should include a Deepgram developer contact.
$.info
warn
deepgram-base-url
Servers should reference api.deepgram.com.
$.servers[*].url
error
deepgram-token-security
API should declare Token-based bearer authentication.
$.components.securitySchemes
warn
deepgram-listen-resource
API should expose /v1/listen for transcription.
$.paths
warn
deepgram-operation-tags
Operations should be tagged Transcription, Speak, or Read.
$.paths[*][*]

Spectral Ruleset

Raw ↑
extends:
  - spectral:oas
rules:
  deepgram-info-contact:
    description: API info should include a Deepgram developer contact.
    given: $.info
    severity: warn
    then:
      field: contact
      function: truthy
  deepgram-base-url:
    description: Servers should reference api.deepgram.com.
    given: $.servers[*].url
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: "api\\.deepgram\\.com"
  deepgram-token-security:
    description: API should declare Token-based bearer authentication.
    given: $.components.securitySchemes
    severity: error
    then:
      field: TokenAuth
      function: truthy
  deepgram-listen-resource:
    description: API should expose /v1/listen for transcription.
    given: $.paths
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: "/v1/listen"
  deepgram-operation-tags:
    description: Operations should be tagged Transcription, Speak, or Read.
    given: $.paths[*][*]
    severity: warn
    then:
      field: tags
      function: truthy