extends: - spectral:oas rules: cta-info-contact: description: API definitions must declare contact information for the CTA Developer Center. severity: error given: $.info then: field: contact function: truthy cta-info-license: description: API definitions must declare a license aligned with the CTA developer license agreement. severity: warn given: $.info then: field: license function: truthy cta-api-key-required: description: CTA APIs that require keys must declare an apiKey security scheme. severity: warn given: $.components.securitySchemes then: function: truthy cta-operation-tags: description: Operations must declare at least one tag for grouping. severity: warn given: $.paths[*][get,post,put,delete,patch] then: field: tags function: truthy cta-operation-id: description: Every operation must have a unique operationId. severity: error given: $.paths[*][get,post,put,delete,patch] then: field: operationId function: truthy cta-key-query-param: description: CTA Train and Bus Tracker operations must accept the key query parameter. severity: info given: $.paths[*][get] then: field: parameters function: truthy