Workday Payroll · API Governance Rules
Workday Payroll API Rules
Spectral linting rules defining API design standards and conventions for Workday Payroll.
69 Rules
error 21
warn 43
info 5
Rule Categories
collection
delete
error
examples
external
get
global
info
no
openapi
operation
parameter
patch
path
paths
pay
post
query
ref
request
response
schema
security
servers
tags
worker
Rules
warn
info-title-format
API title must follow the Workday Payroll naming pattern
$.info.title
error
info-description-required
API info must have a description
$.info
warn
info-description-min-length
API description should be at least 50 characters
$.info.description
error
info-version-required
API info must specify a version
$.info
warn
info-version-format
Version should follow the v{n} pattern (e.g. v1)
$.info.version
warn
info-contact-required
API info must include contact information
$.info
warn
info-contact-email
Contact must include an email address
$.info.contact
info
info-terms-of-service
API info should reference Workday terms of service
$.info
info
external-docs-required
APIs should provide external documentation links
$
error
openapi-version
APIs must use OpenAPI 3.1.x
$.openapi
error
servers-defined
At least one server must be defined
$
error
servers-https
All server URLs must use HTTPS
$.servers[*].url
warn
servers-description-required
All servers should include a description
$.servers[*]
warn
servers-versioned-path
Server URLs should include a version segment (e.g. /v1)
$.servers[*].url
warn
paths-camel-case
Path segments must use camelCase resource names (Workday convention)
$.paths[*]~
error
paths-no-trailing-slash
Paths must not have trailing slashes
$.paths[*]~
error
paths-no-query-strings
Paths must not contain query strings
$.paths[*]~
error
operation-summary-required
All operations must have a summary
$.paths[*][get,post,put,patch,delete]
warn
operation-summary-prefix
Operation summaries should start with "Workday Payroll"
$.paths[*][get,post,put,patch,delete].summary
warn
operation-description-required
All operations must have a description
$.paths[*][get,post,put,patch,delete]
error
operation-id-required
All operations must have an operationId
$.paths[*][get,post,put,patch,delete]
warn
operation-id-camel-case
operationId must use camelCase
$.paths[*][get,post,put,patch,delete].operationId
warn
operation-id-verb-prefix
operationId should start with a recognized verb (list, get, create, update, delete, calculate, complete, submit)
$.paths[*][get,post,put,patch,delete].operationId
error
operation-tags-required
All operations must have at least one tag
$.paths[*][get,post,put,patch,delete]
warn
global-tags-defined
Top-level tags array should be defined for documentation grouping
$
warn
tags-title-case
Global tag names should use Title Case (hyphenated words allowed)
$.tags[*].name
warn
tags-description-required
All global tags must have descriptions
$.tags[*]
error
parameter-description-required
All parameters must have descriptions
#Parameter
warn
parameter-camel-case
Parameter names should use camelCase (Workday convention)
#Parameter
error
parameter-schema-required
All parameters must define a schema
#Parameter
warn
parameter-pagination-limit
Pagination should use a "limit" parameter, not page-size or perPage
$.paths[*][get,post,put,patch,delete].parameters[?(@.in == 'query')].name
warn
parameter-pagination-offset
Pagination should use an "offset" parameter, not page or pageNumber
$.paths[*][get,post,put,patch,delete].parameters[?(@.in == 'query')].name
error
parameter-no-api-key-in-query
API keys must not be passed as query parameters
$.paths[*][get,post,put,patch,delete].parameters[?(@.in == 'query')].name
error
request-body-json-content
Request bodies must support application/json content type
$.paths[*][post,put,patch].requestBody.content
warn
request-body-schema-required
Request body content must reference a schema
$.paths[*][post,put,patch].requestBody.content[*]
error
response-success-required
All operations must define at least one 2xx response
$.paths[*][get,post,put,patch,delete].responses
warn
response-401-required
Operations should define a 401 Unauthorized response
$.paths[*][get,post,put,patch,delete].responses
warn
response-404-on-resource-get
GET operations on a single resource should define a 404 Not Found response
$.paths[?(@property.match(/\\{[a-zA-Z]+\\}$/))].get.responses
warn
response-400-on-mutations
POST/PUT/PATCH operations should define a 400 Bad Request response
$.paths[*][post,put,patch].responses
error
response-description-required
All responses must have a description
$.paths[*][get,post,put,patch,delete].responses[*]
warn
response-json-content
Success responses must use application/json content type
$.paths[*][get,post,put,patch,delete].responses['200','201','202'].content
warn
response-error-schema-fields
Reusable error responses should reference a schema with message/error fields
$.components.responses[*].content.application/json
warn
schema-property-camel-case
Schema property names must use camelCase (Workday convention)
$.components.schemas[*].properties[*]~
warn
schema-type-defined
Top-level schemas must define a type
$.components.schemas[*]
warn
schema-id-property-string
Resource id properties must be strings
$.components.schemas[*].properties.id
warn
schema-timestamps-date-time
createdOn, completedOn, startedAt, completedAt, submittedOn properties should use date-time format
$.components.schemas[*].properties[?(@property.match(/^(createdOn|completedOn|startedAt|completedAt|submittedOn|updatedOn|approvedOn|processedOn)$/))]
warn
schema-effective-date-format
effectiveDate, paymentDate, fromDate, toDate, startDate, endDate properties should use date format
$.components.schemas[*].properties[?(@property.match(/^(effectiveDate|paymentDate|fromDate|toDate|startDate|endDate)$/))]
warn
collection-schema-data-array
Collection schemas (named *Collection) must have a data property
$.components.schemas[?(@property.match(/Collection$/))]
warn
collection-schema-total
Collection schemas (named *Collection) must have a total property indicating full result count
$.components.schemas[?(@property.match(/Collection$/))]
info
ref-schema-naming
Lightweight reference schemas should be named with a Ref suffix (e.g. WorkerRef)
$.components.schemas[?(@property.match(/Ref$/))].properties
error
global-security-defined
Global security must be declared
$
error
security-schemes-defined
Security schemes must be defined under components
$
warn
security-bearer-auth
A bearerAuth security scheme is required for Workday APIs
$.components.securitySchemes
warn
security-bearer-jwt-format
Bearer security scheme should declare bearerFormat (e.g. JWT)
$.components.securitySchemes[?(@.scheme == 'bearer')]
warn
security-scheme-description
Security schemes must include a description
$.components.securitySchemes[*]
error
get-no-request-body
GET operations must not have a request body
$.paths[*].get
warn
delete-no-request-body
DELETE operations should not have a request body
$.paths[*].delete
warn
post-has-request-body
POST operations should have a request body
$.paths[*].post
error
patch-has-request-body
PATCH operations must have a request body
$.paths[*].patch
error
no-empty-descriptions
Descriptions must not be empty strings
$..description
info
examples-encouraged
Response and request examples improve developer experience
$.paths[*][get,post,put,patch,delete].responses['200','201'].content.application/json
warn
worker-id-path-param-naming
Worker ID path parameter must be named workerId
$.paths[*][get,post,put,patch,delete].parameters[?(@.in == 'path' && @.name =~ /^worker/i)].name
warn
pay-run-id-path-param-naming
Pay run ID path parameter must be named payRunId
$.paths[*][get,post,put,patch,delete].parameters[?(@.in == 'path' && @.name =~ /^payRun/i)].name
warn
servers-expected-domain
Server URLs should be on the workday.com domain.
$.servers[*].url
warn
path-params-casing
Path parameters should be camelCase (the dominant convention in this API).
$.paths[*].parameters[?(@.in=='path')].name
warn
query-params-casing
Query parameters should be snake_case (the dominant convention in this API).
$.paths[*][get,post,put,patch,delete].parameters[?(@.in=='query')]
warn
schema-names-casing
Component schema names should be PascalCase (the dominant convention in this API).
$.components.schemas
info
schema-properties-casing
Schema properties should be snake_case (the dominant convention in this API).
$.components.schemas[*].properties
warn
error-schema-defined
A shared error schema (Error) should be defined for error payloads.
$.components.schemas