extends: spectral:oas rules: workday-extend-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-extend-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-extend-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-extend-operation-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-extend-operation-description-required: description: All operations must have a description. severity: warn given: "$.paths[*][get,post,put,patch,delete]" then: field: description function: truthy workday-extend-path-kebab-case: description: Path segments must use kebab-case. severity: warn given: "$.paths[*]~" then: function: pattern functionOptions: match: "^(/[a-z0-9{}-]+)+$" workday-extend-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-extend-security-defined: description: All operations must define security requirements. severity: error given: "$.paths[*][get,post,put,patch,delete]" then: field: security function: truthy workday-extend-oauth2-scopes: description: OAuth2 flows must define scopes. severity: error given: "$.components.securitySchemes[*].flows[*].scopes" then: function: truthy workday-extend-parameters-description: description: All parameters must have a description. severity: warn given: "$.components.parameters[*]" then: field: description function: truthy workday-extend-info-contact: description: API info must include contact details. severity: warn given: "$.info" then: field: contact function: truthy workday-extend-servers-defined: description: At least one server must be defined. severity: error given: "$" then: field: servers function: truthy workday-extend-schema-properties-description: description: Schema properties should include descriptions for documentation. severity: hint given: "$.components.schemas[*].properties[*]" then: field: description function: truthy workday-extend-pagination-limit-param: description: Collection endpoints should support limit query parameter for pagination. severity: warn given: "$.paths[*].get.parameters[*][?(@.name == 'limit')]" then: field: schema.type function: pattern functionOptions: match: "integer" workday-extend-tenant-variable-required: description: Server URLs must include tenant variable for multi-tenancy. severity: warn given: "$.servers[*].url" then: function: pattern functionOptions: match: "\\{tenant\\}"