Workday Integrations · API Governance Rules

Workday Integrations API Rules

Spectral linting rules defining API design standards and conventions for Workday Integrations.

11 Rules error 4 warn 6
View Rules File View on GitHub

Rule Categories

workday

Rules

error
workday-integrations-operation-id-required
All operations must have an operationId.
$.paths[*][get,post,put,patch,delete]
error
workday-integrations-operation-summary-required
All operations must have a summary.
$.paths[*][get,post,put,patch,delete]
warn
workday-integrations-summary-title-case
Operation summaries must use Title Case.
$.paths[*][get,post,put,patch,delete].summary
error
workday-integrations-tags-required
All operations must have at least one tag.
$.paths[*][get,post,put,patch,delete]
warn
workday-integrations-description-required
All operations must have a description.
$.paths[*][get,post,put,patch,delete]
error
workday-integrations-bearer-auth
Bearer authentication must be defined.
$.components.securitySchemes
warn
workday-integrations-tenant-in-url
Server URLs must include tenant variable.
$.servers[*].url
warn
workday-integrations-pagination-support
Collection endpoints should support limit parameter.
$.paths[*].get.parameters[*][?(@.name == 'limit')]
warn
workday-integrations-response-schema
Success responses must define a content schema.
$.paths[*][get,post].responses['200','201'].content.application/json.schema
warn
workday-integrations-path-params-described
Path parameters must have descriptions.
$.paths[*].parameters[?(@.in == 'path')]
hint
workday-integrations-external-docs
API info should include external documentation link.
$

Spectral Ruleset

Raw ↑
extends: spectral:oas
rules:

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

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

  workday-integrations-summary-title-case:
    description: Operation summaries must use Title Case.
    severity: warn
    given: "$.paths[*][get,post,put,patch,delete].summary"
    then:
      function: pattern
      functionOptions:
        match: "^[A-Z]"

  workday-integrations-tags-required:
    description: All operations must have at least one tag.
    severity: error
    given: "$.paths[*][get,post,put,patch,delete]"
    then:
      field: tags
      function: truthy

  workday-integrations-description-required:
    description: All operations must have a description.
    severity: warn
    given: "$.paths[*][get,post,put,patch,delete]"
    then:
      field: description
      function: truthy

  workday-integrations-bearer-auth:
    description: Bearer authentication must be defined.
    severity: error
    given: "$.components.securitySchemes"
    then:
      function: truthy

  workday-integrations-tenant-in-url:
    description: Server URLs must include tenant variable.
    severity: warn
    given: "$.servers[*].url"
    then:
      function: pattern
      functionOptions:
        match: "\\{tenant\\}"

  workday-integrations-pagination-support:
    description: Collection endpoints should support limit parameter.
    severity: warn
    given: "$.paths[*].get.parameters[*][?(@.name == 'limit')]"
    then:
      field: schema.type
      function: pattern
      functionOptions:
        match: "integer"

  workday-integrations-response-schema:
    description: Success responses must define a content schema.
    severity: warn
    given: "$.paths[*][get,post].responses['200','201'].content.application/json.schema"
    then:
      function: truthy

  workday-integrations-path-params-described:
    description: Path parameters must have descriptions.
    severity: warn
    given: "$.paths[*].parameters[?(@.in == 'path')]"
    then:
      field: description
      function: truthy

  workday-integrations-external-docs:
    description: API info should include external documentation link.
    severity: hint
    given: "$"
    then:
      field: externalDocs
      function: truthy