Argo Workflows · API Governance Rules

Argo Workflows API Rules

Spectral linting rules defining API design standards and conventions for Argo Workflows.

15 Rules error 5 warn 8 info 2
View Rules File View on GitHub

Rule Categories

info no operation parameter path paths response security

Rules

warn
info-title-prefix
API title must start with "Argo Workflows"
$.info.title
error
info-description-required
API must have a description
$.info
error
operation-summary-required
Every operation must have a summary
$.paths[*][get,post,put,delete,patch]
warn
operation-summary-prefix
Operation summaries must start with "Argo Workflows"
$.paths[*][get,post,put,delete,patch].summary
error
operation-operationid-required
Every operation must have an operationId
$.paths[*][get,post,put,delete,patch]
warn
operation-tags-required
Every operation must have at least one tag
$.paths[*][get,post,put,delete,patch]
info
paths-versioned
All paths should be versioned
$.paths[*]~
info
paths-kebab-case
Path segments should use kebab-case or camelCase
$.paths[*]~
error
response-success-required
Every operation must define at least one response
$.paths[*][get,post,put,delete,patch].responses
warn
response-description-required
All responses must have a description
$.paths[*][get,post,put,delete,patch].responses[*]
warn
security-definitions-required
API must define security schemes
$
error
no-empty-summaries
Summaries must not be empty
$.paths[*][get,post,put,delete,patch].summary
warn
parameter-description-required
Parameters should have descriptions
$.paths[*][get,post,put,delete,patch].parameters[*]
warn
path-params-casing
Path parameters should be snake_case (the dominant convention in this API).
$.paths[*].parameters[?(@.in=='path')].name
warn
no-empty-descriptions
Descriptions must not be empty strings.
$..description

Spectral Ruleset

Raw ↑
# argo-workflows — Spectral ruleset (strengthened)
# Plain Spectral. Existing hand-authored rules preserved; measured rules added
# from this provider's own OpenAPI conventions by strengthen_ruleset.py,
# then self-validated against the spec.
#
# Provenance:
#   - path-params-casing: snake @ 88% (n=108)
#   - merge: kept 13 existing, added 2 measured, upgraded 0
#   - added: path-params-casing, no-empty-descriptions
extends:
  - spectral:oas
rules:
  info-title-prefix:
    description: API title must start with "Argo Workflows"
    severity: warn
    given: $.info.title
    then:
      function: pattern
      functionOptions:
        match: ^Argo Workflows
  info-description-required:
    description: API must have a description
    severity: error
    given: $.info
    then:
      field: description
      function: truthy
  operation-summary-required:
    description: Every operation must have a summary
    severity: error
    given: $.paths[*][get,post,put,delete,patch]
    then:
      field: summary
      function: truthy
  operation-summary-prefix:
    description: Operation summaries must start with "Argo Workflows"
    severity: warn
    given: $.paths[*][get,post,put,delete,patch].summary
    then:
      function: pattern
      functionOptions:
        match: ^Argo Workflows
  operation-operationid-required:
    description: Every operation must have an operationId
    severity: error
    given: $.paths[*][get,post,put,delete,patch]
    then:
      field: operationId
      function: truthy
  operation-tags-required:
    description: Every operation must have at least one tag
    severity: warn
    given: $.paths[*][get,post,put,delete,patch]
    then:
      field: tags
      function: truthy
  paths-versioned:
    description: All paths should be versioned
    severity: info
    given: $.paths[*]~
    then:
      function: pattern
      functionOptions:
        match: ^/api/v
  paths-kebab-case:
    description: Path segments should use kebab-case or camelCase
    severity: info
    given: $.paths[*]~
    then:
      function: pattern
      functionOptions:
        match: ^(/api/v[0-9]+)?(/[a-zA-Z0-9{}-]+)*$
  response-success-required:
    description: Every operation must define at least one response
    severity: error
    given: $.paths[*][get,post,put,delete,patch].responses
    then:
      function: schema
      functionOptions:
        schema:
          type: object
          minProperties: 1
  response-description-required:
    description: All responses must have a description
    severity: warn
    given: $.paths[*][get,post,put,delete,patch].responses[*]
    then:
      field: description
      function: truthy
  security-definitions-required:
    description: API must define security schemes
    severity: warn
    given: $
    then:
      field: securityDefinitions
      function: truthy
  no-empty-summaries:
    description: Summaries must not be empty
    severity: error
    given: $.paths[*][get,post,put,delete,patch].summary
    then:
      function: pattern
      functionOptions:
        match: .+
  parameter-description-required:
    description: Parameters should have descriptions
    severity: warn
    given: $.paths[*][get,post,put,delete,patch].parameters[*]
    then:
      field: description
      function: truthy
  path-params-casing:
    description: Path parameters should be snake_case (the dominant convention in this API).
    severity: warn
    given: $.paths[*].parameters[?(@.in=='path')].name
    then:
      function: casing
      functionOptions:
        type: snake
  no-empty-descriptions:
    description: Descriptions must not be empty strings.
    severity: warn
    given: $..description
    then:
      function: truthy