rules: thermal-power-operation-summary-title-case: description: All operation summaries must use Title Case. message: "Operation summary '{{value}}' must use Title Case." severity: warn given: "$.paths[*][*].summary" then: function: pattern functionOptions: match: "^[A-Z][a-zA-Z0-9 ]*$" thermal-power-operation-ids-camel-case: description: All operationIds must use camelCase. message: "OperationId '{{value}}' must be camelCase." severity: warn given: "$.paths[*][*].operationId" then: function: pattern functionOptions: match: "^[a-z][a-zA-Z0-9]*$" thermal-power-api-key-required: description: All operations must require api_key query parameter. message: "Operation at '{{path}}' must define api_key as a required query parameter." severity: error given: "$.paths[*][get,post].parameters[?(@.name == 'api_key')]" then: field: required function: truthy thermal-power-pagination-params: description: All list operations should support offset and length pagination. message: "List operation at '{{path}}' should support offset/length pagination." severity: warn given: "$.paths[*][get]" then: function: schema functionOptions: schema: type: object thermal-power-tags-required: description: All operations must have at least one tag. message: "Operation at '{{path}}' must have at least one tag." severity: error given: "$.paths[*][get,post,put,patch,delete]" then: field: tags function: truthy thermal-power-description-required: description: All operations must have a description. message: "Operation at '{{path}}' is missing a description." severity: warn given: "$.paths[*][get,post,put,patch,delete]" then: field: description function: truthy thermal-power-200-response-defined: description: All GET operations must define a 200 response. message: "GET operation at '{{path}}' must define a 200 response." severity: error given: "$.paths[*][get].responses" then: field: "200" function: defined thermal-power-path-data-suffix: description: EIA API data paths should end with /data. message: "Path '{{path}}' should follow EIA pattern ending with /data." severity: info given: "$.paths[*]~" then: function: pattern functionOptions: match: ".*\\/data$"