extends: spectral:oas rules: ssc-geneva-operation-summary-title-case: description: All operation summaries must use Title Case severity: warn given: "$.paths[*][*].summary" then: function: pattern functionOptions: match: "^([A-Z][a-z0-9]*\\s?)+$" ssc-geneva-operationid-camel-case: description: operationId must use camelCase severity: warn given: "$.paths[*][*].operationId" then: function: pattern functionOptions: match: "^[a-z][a-zA-Z0-9]*$" ssc-geneva-tags-required: description: Every operation must have at least one tag severity: error given: "$.paths[*][*]" then: field: tags function: truthy ssc-geneva-description-required: description: All operations must have a description severity: warn given: "$.paths[*][*].description" then: function: truthy ssc-geneva-portfolio-id-path-param: description: Portfolio paths must include portfolioId as a path parameter severity: warn given: "$.paths[~/portfolios/{portfolioId}*]" then: function: truthy ssc-geneva-date-format-query-params: description: Date query parameters should use ISO 8601 date format severity: warn given: "$.paths[*][*].parameters[?(@.in == 'query' && @.name =~ /[Dd]ate$/)]" then: field: schema.format function: enumeration functionOptions: values: - date - date-time ssc-geneva-response-200-required: description: All GET operations must define a 200 response severity: error given: "$.paths[*].get" then: field: responses.200 function: truthy ssc-geneva-financial-enum-uppercase: description: Financial status and type enumerations should use SCREAMING_SNAKE_CASE severity: hint given: "$.components.schemas[*].properties[?(@.enum)]" then: function: schema functionOptions: schema: type: object properties: enum: type: array items: type: string pattern: "^[A-Z_]+$"