Workday Financials · API Governance Rules

Workday Financials API Rules

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

12 Rules error 5 warn 6
View Rules File View on GitHub

Rule Categories

workday

Rules

error
workday-financials-operation-id-required
All operations must have an operationId.
$.paths[*][get,post,put,patch,delete]
error
workday-financials-operation-summary-required
All operations must have a summary.
$.paths[*][get,post,put,patch,delete]
warn
workday-financials-operation-summary-title-case
Operation summaries must use Title Case.
$.paths[*][get,post,put,patch,delete].summary
error
workday-financials-tags-required
All operations must have at least one tag.
$.paths[*][get,post,put,patch,delete]
warn
workday-financials-description-required
All operations must have a description.
$.paths[*][get,post,put,patch,delete]
error
workday-financials-bearer-auth-defined
Bearer authentication must be defined in security schemes.
$.components.securitySchemes
warn
workday-financials-tenant-in-server-url
Server URLs must include tenant variable for multi-tenancy.
$.servers[*].url
warn
workday-financials-response-200-schema
GET operations must define a schema for 200 responses.
$.paths[*].get.responses.200.content.application/json.schema
warn
workday-financials-pagination-limit
Collection GET operations should support limit parameter.
$.paths[*].get.parameters[*][?(@.name == 'limit')]
hint
workday-financials-financial-amounts-number-type
Amount fields should use number type with double format.
$.components.schemas[*].properties[?(@property.match(/[Aa]mount|[Bb]alance/))]
warn
workday-financials-date-format
Date fields should specify date or date-time format.
$.components.schemas[*].properties[?(@property.match(/[Dd]ate$|[Oo]n$/))]
error
workday-financials-info-version
API info must include a version.
$.info

Spectral Ruleset

Raw ↑
extends: spectral:oas
rules:

  workday-financials-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-financials-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-financials-operation-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-financials-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-financials-description-required:
    description: All operations must have a description.
    severity: warn
    given: "$.paths[*][get,post,put,patch,delete]"
    then:
      field: description
      function: truthy

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

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

  workday-financials-response-200-schema:
    description: GET operations must define a schema for 200 responses.
    severity: warn
    given: "$.paths[*].get.responses.200.content.application/json.schema"
    then:
      function: truthy

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

  workday-financials-financial-amounts-number-type:
    description: Amount fields should use number type with double format.
    severity: hint
    given: "$.components.schemas[*].properties[?(@property.match(/[Aa]mount|[Bb]alance/))]"
    then:
      field: type
      function: pattern
      functionOptions:
        match: "number"

  workday-financials-date-format:
    description: Date fields should specify date or date-time format.
    severity: warn
    given: "$.components.schemas[*].properties[?(@property.match(/[Dd]ate$|[Oo]n$/))]"
    then:
      field: format
      function: truthy

  workday-financials-info-version:
    description: API info must include a version.
    severity: error
    given: "$.info"
    then:
      field: version
      function: truthy