rules: toyota-operation-id-camel-case: description: Operation IDs must use camelCase severity: warn given: "$.paths[*][*].operationId" then: function: pattern functionOptions: match: "^[a-z][a-zA-Z0-9]*$" toyota-operation-summary-title-case: description: Operation summaries must use Title Case severity: warn given: "$.paths[*][*].summary" then: function: pattern functionOptions: match: "^[A-Z][a-zA-Z0-9 ]*$" toyota-paths-kebab-case: description: API paths must use kebab-case severity: warn given: "$.paths[*]~" then: function: pattern functionOptions: match: "^(/[a-z0-9-]+|/\\{[a-zA-Z0-9]+\\})*$" toyota-must-have-tags: description: All operations must have at least one tag severity: error given: "$.paths[*][get,post,put,patch,delete]" then: field: tags function: truthy toyota-vin-path-parameter: description: VIN path parameters should have proper length constraints severity: warn given: "$.paths[*][*].parameters[?(@.name == 'vin' && @.in == 'path')]" then: function: schema functionOptions: schema: properties: schema: properties: minLength: enum: [17] maxLength: enum: [17] toyota-must-have-200-or-201: description: All operations must define a success response severity: error given: "$.paths[*][get,post,put,patch,delete].responses" then: function: schema functionOptions: schema: anyOf: - required: ["200"] - required: ["201"] toyota-pagination-on-list-operations: description: List operations should support pagination parameters severity: warn given: "$.paths[*][get][?(@.operationId =~ /^list/)]" then: field: parameters function: truthy toyota-vehicle-endpoints-auth: description: All vehicle endpoints must require authentication given: "$.paths[/vehicles*][get,post,put,patch,delete]" severity: error then: field: security function: truthy toyota-coordinates-format: description: Latitude and longitude fields should use double format severity: warn given: "$.components.schemas[*].properties[latitude,longitude]" then: function: schema functionOptions: schema: properties: format: enum: ["double"]