extends: spectral:oas rules: spiceworks-operation-summary-title-case: description: All operation summaries must use Title Case message: Operation summary "{{value}}" should be in Title Case severity: warn given: "$.paths[*][*].summary" then: function: pattern functionOptions: match: "^[A-Z][a-zA-Z0-9]*([ ][A-Z][a-zA-Z0-9]*)*$" spiceworks-tags-title-case: description: All tags must use Title Case message: Tag "{{value}}" should be in Title Case severity: warn given: "$.tags[*].name" then: function: pattern functionOptions: match: "^[A-Z][a-zA-Z0-9]*([ ][A-Z][a-zA-Z0-9]*)*$" spiceworks-operation-tags: description: All operations must have at least one tag message: Operation must have at least one tag severity: error given: "$.paths[*][get,post,put,patch,delete]" then: field: tags function: truthy spiceworks-operation-id: description: All operations must have an operationId message: Operation must have an operationId severity: error given: "$.paths[*][get,post,put,patch,delete]" then: field: operationId function: truthy spiceworks-operation-description: description: All operations must have a description message: Operation should have a description severity: warn given: "$.paths[*][get,post,put,patch,delete]" then: field: description function: truthy spiceworks-path-kebab-case: description: Path segments must use kebab-case message: Path segment "{{value}}" should use kebab-case (lowercase with hyphens) severity: warn given: "$.paths[*]~" then: function: pattern functionOptions: match: "^(/[a-z0-9{][a-z0-9_{}/-]*)*$" spiceworks-response-200-schema: description: GET operations must define a 200 response schema message: GET operation should define a 200 response with a schema severity: warn given: "$.paths[*].get.responses.200.content" then: function: truthy spiceworks-security-defined: description: All operations should have security defined message: Operation should define security requirements severity: warn given: "$.paths[*][get,post,put,patch,delete]" then: field: security function: defined