RTX · API Governance Rules

RTX API Rules

Spectral linting rules defining API design standards and conventions for RTX.

9 Rules error 2 warn 7
View Rules File View on GitHub

Rule Categories

no rtx servers

Rules

warn
rtx-operation-ids-camel-case
All operationIds must use camelCase naming convention.
$.paths.*[get,post,put,patch,delete].operationId
warn
rtx-tags-title-case
All tags must use Title Case.
$.tags[*].name
warn
rtx-bearer-auth-required
RTX EAGLE API uses bearer token authentication.
$.components.securitySchemes
warn
rtx-paths-kebab-case
All path segments must use kebab-case.
$.paths
error
rtx-response-200-defined
All operations must define a 200 response.
$.paths.*[get,post,put,patch,delete].responses
warn
rtx-summaries-title-case
Operation summaries must use Title Case.
$.paths.*[get,post,put,patch,delete].summary
error
servers-https-only
Server URLs must use HTTPS.
$.servers[*].url
warn
servers-expected-domain
Server URLs should be on the rtx.com domain.
$.servers[*].url
warn
no-empty-descriptions
Descriptions must not be empty strings.
$..description

Spectral Ruleset

Raw ↑
# rtx — Spectral ruleset (strengthened)
# Plain Spectral. Existing hand-authored rules preserved; measured rules added
# from this provider's own OpenAPI conventions by strengthen_ruleset.py,
# then self-validated against the spec.
#
# Provenance:
#   - servers-https-only: 100% of servers already https (error)
#   - servers-expected-domain: 1/1 servers on rtx.com
#   - operationid-casing: camel @ 100% (n=3)
#   - security: neither global nor consistently per-op — schemes-defined only
#   - merge: kept 6 existing, added 3 measured, upgraded 0
#   - added: servers-https-only, servers-expected-domain, no-empty-descriptions
extends:
  - spectral:oas
rules:
  rtx-operation-ids-camel-case:
    description: All operationIds must use camelCase naming convention.
    severity: warn
    given: $.paths.*[get,post,put,patch,delete].operationId
    then:
      function: pattern
      functionOptions:
        match: ^[a-z][a-zA-Z0-9]*$
  rtx-tags-title-case:
    description: All tags must use Title Case.
    severity: warn
    given: $.tags[*].name
    then:
      function: pattern
      functionOptions:
        match: ^[A-Z][a-zA-Z0-9 ]*$
  rtx-bearer-auth-required:
    description: RTX EAGLE API uses bearer token authentication.
    severity: warn
    given: $.components.securitySchemes
    then:
      function: schema
      functionOptions:
        schema:
          properties:
            bearerAuth:
              type: object
  rtx-paths-kebab-case:
    description: All path segments must use kebab-case.
    severity: warn
    given: $.paths
    then:
      function: pattern
      functionOptions:
        match: ^(/[a-z0-9{}-]+)+$
  rtx-response-200-defined:
    description: All operations must define a 200 response.
    severity: error
    given: $.paths.*[get,post,put,patch,delete].responses
    then:
      function: schema
      functionOptions:
        schema:
          required:
          - '200'
  rtx-summaries-title-case:
    description: Operation summaries must use Title Case.
    severity: warn
    given: $.paths.*[get,post,put,patch,delete].summary
    then:
      function: pattern
      functionOptions:
        match: ^[A-Z]
  servers-https-only:
    description: Server URLs must use HTTPS.
    severity: error
    given: $.servers[*].url
    then:
      function: pattern
      functionOptions:
        match: ^https://
  servers-expected-domain:
    description: Server URLs should be on the rtx.com domain.
    severity: warn
    given: $.servers[*].url
    then:
      function: pattern
      functionOptions:
        match: rtx\.com
  no-empty-descriptions:
    description: Descriptions must not be empty strings.
    severity: warn
    given: $..description
    then:
      function: truthy