Traefik Mesh · API Governance Rules

Traefik Mesh API Rules

Spectral linting rules defining API design standards and conventions for Traefik Mesh.

Traefik Mesh API Rules is a Spectral governance ruleset published by Traefik Mesh on the APIs.io network, containing 15 lint rules.

The ruleset includes 8 error-severity rules and 7 warning-severity rules.

Tagged areas include Kubernetes, Service Mesh, Open Source, SMI, and Traffic Management.

Rulesets can be applied to your own OpenAPI specs via Spectral to enforce the same governance standards.

15 Rules error 8 warn 7
View Rules File View on GitHub

Rule Categories

info operation parameter paths response schema servers

Rules

error
info-title-required
$.info
warn
info-title-format
$.info.title
error
info-description-required
$.info
error
info-version-required
$.info
error
servers-defined
$
error
paths-no-trailing-slash
$.paths
error
operation-operationId-required
$.paths[*][*]
error
operation-summary-required
$.paths[*][*]
warn
operation-summary-title-case
$.paths[*][*].summary
warn
operation-description-required
$.paths[*][*]
warn
operation-tags-required
$.paths[*][*]
error
response-200-defined
$.paths[*][get]
warn
paths-api-prefix
$.paths
warn
parameter-description-required
$.paths[*][*].parameters[*]
warn
schema-description-required
$.components.schemas[*]

Spectral Ruleset

Raw ↑
rules:
  info-title-required:
    severity: error
    given: $.info
    then: {field: title, function: truthy}
  info-title-format:
    severity: warn
    given: $.info.title
    then: {function: pattern, functionOptions: {match: "^Traefik Mesh "}}
  info-description-required:
    severity: error
    given: $.info
    then: {field: description, function: truthy}
  info-version-required:
    severity: error
    given: $.info
    then: {field: version, function: truthy}
  servers-defined:
    severity: error
    given: $
    then: {field: servers, function: truthy}
  paths-no-trailing-slash:
    severity: error
    given: $.paths
    then: {field: "@key", function: pattern, functionOptions: {notMatch: "\\/$"}}
  operation-operationId-required:
    severity: error
    given: $.paths[*][*]
    then: {field: operationId, function: truthy}
  operation-summary-required:
    severity: error
    given: $.paths[*][*]
    then: {field: summary, function: truthy}
  operation-summary-title-case:
    severity: warn
    given: $.paths[*][*].summary
    then: {function: pattern, functionOptions: {match: "^[A-Z][a-z]"}}
  operation-description-required:
    severity: warn
    given: $.paths[*][*]
    then: {field: description, function: truthy}
  operation-tags-required:
    severity: warn
    given: $.paths[*][*]
    then: {field: tags, function: truthy}
  response-200-defined:
    severity: error
    given: $.paths[*][get]
    then: {field: responses, function: truthy}
  paths-api-prefix:
    severity: warn
    given: $.paths
    then: {field: "@key", function: pattern, functionOptions: {match: "^\\/api\\/"}}
  parameter-description-required:
    severity: warn
    given: $.paths[*][*].parameters[*]
    then: {field: description, function: truthy}
  schema-description-required:
    severity: warn
    given: $.components.schemas[*]
    then: {field: description, function: truthy}