Debian · API Governance Rules

Debian API Rules

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

5 Rules warn 5
View Rules File View on GitHub

Rule Categories

debian

Rules

warn
debian-info-license
API info should declare the license used for served content.
$.info
warn
debian-sources-base-url
Servers should reference sources.debian.org.
$.servers[*].url
warn
debian-list-resource
API should expose /list as a primary path for package discovery.
$.paths
warn
debian-ping-resource
API should expose /ping/ for health checks.
$.paths
warn
debian-operation-tags
Operations should be tagged Sources, Copyright, or Patches.
$.paths[*][*]

Spectral Ruleset

Raw ↑
extends:
  - spectral:oas
rules:
  debian-info-license:
    description: API info should declare the license used for served content.
    given: $.info
    severity: warn
    then:
      field: license
      function: truthy
  debian-sources-base-url:
    description: Servers should reference sources.debian.org.
    given: $.servers[*].url
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: "sources\\.debian\\.org"
  debian-list-resource:
    description: API should expose /list as a primary path for package discovery.
    given: $.paths
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: "/list"
  debian-ping-resource:
    description: API should expose /ping/ for health checks.
    given: $.paths
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: "/ping"
  debian-operation-tags:
    description: Operations should be tagged Sources, Copyright, or Patches.
    given: $.paths[*][*]
    severity: warn
    then:
      field: tags
      function: truthy