extends: - spectral:oas rules: spring-boot-actuator-operation-id-prefix: description: Actuator operation IDs should be descriptive and use camelCase message: "Operation ID '{{value}}' should be camelCase and descriptive (e.g., getHealth, listMetrics)" given: "$.paths[*][get,post,put,delete,patch].operationId" severity: warn then: function: pattern functionOptions: match: "^[a-z][a-zA-Z0-9]+$" spring-boot-actuator-summary-title-case: description: All operation summaries must use Title Case message: "Summary '{{value}}' should use Title Case" given: "$.paths[*][get,post,put,delete,patch].summary" severity: warn then: function: pattern functionOptions: match: "^[A-Z][^a-z]*([A-Z][^a-z]*)*" spring-boot-actuator-tags-defined: description: All operations must have at least one tag message: "Operation '{{path}}' is missing tags" given: "$.paths[*][get,post,put,delete,patch]" severity: error then: field: tags function: truthy spring-boot-actuator-tags-title-case: description: All tags must use Title Case message: "Tag '{{value}}' should be in Title Case (e.g., 'Health', 'Metrics', 'Environment')" given: "$.paths[*][get,post,put,delete,patch].tags[*]" severity: warn then: function: pattern functionOptions: match: "^[A-Z][a-zA-Z ]+$" spring-boot-actuator-response-200-defined: description: All GET operations must define a 200 response message: "GET operation at '{{path}}' must define a 200 response" given: "$.paths[*].get" severity: error then: field: responses.200 function: truthy spring-boot-actuator-path-lowercase-kebab: description: Actuator endpoint paths should use lowercase with hyphens message: "Path '{{path}}' should use lowercase kebab-case" given: "$.paths" severity: warn then: function: pattern functionOptions: match: "^\\/[a-z0-9\\-\\/\\{\\}]*$" spring-boot-actuator-no-trailing-slash: description: Paths must not end with a trailing slash message: "Path '{{path}}' must not end with a trailing slash" given: "$.paths" severity: error then: function: pattern functionOptions: notMatch: ".*\\/$" spring-boot-actuator-info-contact-defined: description: API info must include contact information message: "API info must include a contact block with name and url" given: "$.info" severity: warn then: field: contact function: truthy spring-boot-actuator-servers-defined: description: At least one server must be defined message: "OpenAPI spec must define at least one server" given: "$" severity: error then: field: servers function: truthy