extends: spectral:oas rules: trimble-operation-ids-camel-case: description: Operation IDs must use camelCase naming convention severity: warn given: "$.paths[*][get,post,put,patch,delete,head,options].operationId" then: function: pattern functionOptions: match: "^[a-z][a-zA-Z0-9]*$" trimble-operation-summary-title-case: description: Operation summaries should use Title Case severity: warn given: "$.paths[*][get,post,put,patch,delete].summary" then: function: pattern functionOptions: match: "^[A-Z][a-zA-Z0-9 ,()\\-']+$" trimble-operation-has-tags: description: All operations must have at least one tag severity: error given: "$.paths[*][get,post,put,patch,delete,head,options]" then: field: tags function: truthy trimble-tag-title-case: description: Tags must use Title Case severity: warn given: "$.paths[*][get,post,put,patch,delete].tags[*]" then: function: pattern functionOptions: match: "^[A-Z][a-zA-Z0-9 \\-]*$" trimble-operation-description: description: All operations should have a description severity: warn given: "$.paths[*][get,post,put,patch,delete]" then: field: description function: truthy trimble-bearer-auth-scheme: description: Bearer auth security scheme should be named BearerAuth severity: warn given: "$.components.securitySchemes" then: function: schema functionOptions: schema: type: object properties: BearerAuth: type: object trimble-response-200-schema: description: Successful GET responses must define a response schema severity: warn given: "$.paths[*].get.responses.200.content.application/json" then: field: schema function: defined trimble-project-id-path-param: description: Project ID path parameters must be named projectId severity: warn given: "$.paths[*][get,post,put,patch,delete].parameters[?(@.in == 'path')]" then: function: schema functionOptions: schema: if: properties: name: pattern: ".*[Pp]roject.*[Ii]d.*" then: properties: name: const: projectId trimble-connect-pagination-params: description: List operations should include pagination parameters severity: hint given: "$.paths[*].get" then: function: schema functionOptions: schema: type: object trimble-error-responses: description: Operations should define 401 Unauthorized response severity: warn given: "$.paths[*][get,post,put,patch,delete].responses" then: function: schema functionOptions: schema: type: object properties: "401": type: object trimble-no-x-internal: description: Internal-only operations must not appear in public API specifications severity: error given: "$.paths[*][get,post,put,patch,delete]" then: field: x-internal function: falsy trimble-api-version-in-info: description: API specification must include a version in info object severity: error given: "$.info" then: field: version function: truthy