Amazon Route 53 · API Governance Rules

Amazon Route 53 API Rules

Spectral linting rules defining API design standards and conventions for Amazon Route 53.

26 Rules error 8 warn 17 info 1
View Rules File View on GitHub

Rule Categories

delete get info no openapi operation operationid parameter path query response schema security server servers

Rules

error
info-title-required
API must have a title
$.info
warn
info-description-required
API must have a description
$.info
error
info-version-required
API must have a version
$.info
error
openapi-version-3
API must use OpenAPI 3.x
$
error
servers-defined
Servers must be defined
$
warn
server-https
Server URLs should use HTTPS
$.servers[*]
error
operation-summary-required
Operations must have a summary
$.paths[*][get,post,put,patch,delete,options,head]
warn
operation-description-required
Operations must have a description
$.paths[*][get,post,put,patch,delete,options,head]
error
operation-id-required
Operations must have an operationId
$.paths[*][get,post,put,patch,delete,options,head]
warn
operation-id-camel-case
OperationId should use camelCase
$.paths[*][get,post,put,patch,delete,options,head]
warn
operation-tags-required
Operations must have tags
$.paths[*][get,post,put,patch,delete,options,head]
warn
parameter-description-required
Parameters must have descriptions
$.paths[*][*].parameters[*]
error
response-success-required
Operations must have a success response
$.paths[*][get,post,put,patch,delete]
warn
response-description-required
Responses must have descriptions
$.paths[*][*].responses[*]
warn
schema-type-defined
Schema properties should have types
$.components.schemas[*].properties[*]
info
schema-description-required
Top-level schemas should have descriptions
$.components.schemas[*]
warn
security-schemes-defined
Security schemes should be defined
$.components
error
get-no-request-body
GET operations should not have a request body
$.paths[*].get
warn
delete-no-request-body
DELETE operations should not have a request body
$.paths[*].delete
warn
servers-expected-domain
Server URLs should be on the amazonaws.com domain.
$.servers[*].url
warn
path-params-casing
Path parameters should be PascalCase (the dominant convention in this API).
$.paths[*].parameters[?(@.in=='path')].name
warn
query-params-casing
Query parameters should be snake_case (the dominant convention in this API).
$.paths[*][get,post,put,patch,delete].parameters[?(@.in=='query')]
warn
operationid-casing
Operation IDs should be PascalCase (the dominant convention in this API).
$.paths[*][get,post,put,patch,delete].operationId
warn
schema-names-casing
Component schema names should be PascalCase (the dominant convention in this API).
$.components.schemas
warn
schema-properties-casing
Schema properties should be PascalCase (the dominant convention in this API).
$.components.schemas[*].properties
warn
no-empty-descriptions
Descriptions must not be empty strings.
$..description

Spectral Ruleset

Raw ↑
# amazon-route-53 — 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 amazonaws.com
#   - path-params-casing: pascal @ 100% (n=5)
#   - query-params-casing: snake @ 100% (n=7)
#   - operationid-casing: pascal @ 100% (n=9)
#   - schema-names-casing: pascal @ 100% (n=17)
#   - schema-properties-casing: pascal @ 97% (n=61)
#   - security: global (root) — NOT emitting operation-security-required
#   - merge: kept 19 existing, added 7 measured, upgraded 0
#   - added: servers-expected-domain, path-params-casing, query-params-casing, operationid-casing, schema-names-casing, schema-properties-casing, no-empty-descriptions
extends:
  - spectral:oas
rules:
  info-title-required:
    description: API must have a title
    severity: error
    given: $.info
    then:
      field: title
      function: truthy
  info-description-required:
    description: API must have a description
    severity: warn
    given: $.info
    then:
      field: description
      function: truthy
  info-version-required:
    description: API must have a version
    severity: error
    given: $.info
    then:
      field: version
      function: truthy
  openapi-version-3:
    description: API must use OpenAPI 3.x
    severity: error
    given: $
    then:
      field: openapi
      function: pattern
      functionOptions:
        match: ^3\.
  servers-defined:
    description: Servers must be defined
    severity: error
    given: $
    then:
      field: servers
      function: truthy
  server-https:
    description: Server URLs should use HTTPS
    severity: warn
    given: $.servers[*]
    then:
      field: url
      function: pattern
      functionOptions:
        match: ^https://
  operation-summary-required:
    description: Operations must have a summary
    severity: error
    given: $.paths[*][get,post,put,patch,delete,options,head]
    then:
      field: summary
      function: truthy
  operation-description-required:
    description: Operations must have a description
    severity: warn
    given: $.paths[*][get,post,put,patch,delete,options,head]
    then:
      field: description
      function: truthy
  operation-id-required:
    description: Operations must have an operationId
    severity: error
    given: $.paths[*][get,post,put,patch,delete,options,head]
    then:
      field: operationId
      function: truthy
  operation-id-camel-case:
    description: OperationId should use camelCase
    severity: warn
    given: $.paths[*][get,post,put,patch,delete,options,head]
    then:
      field: operationId
      function: pattern
      functionOptions:
        match: ^[a-z][a-zA-Z0-9]*$
  operation-tags-required:
    description: Operations must have tags
    severity: warn
    given: $.paths[*][get,post,put,patch,delete,options,head]
    then:
      field: tags
      function: truthy
  parameter-description-required:
    description: Parameters must have descriptions
    severity: warn
    given: $.paths[*][*].parameters[*]
    then:
      field: description
      function: truthy
  response-success-required:
    description: Operations must have a success response
    severity: error
    given: $.paths[*][get,post,put,patch,delete]
    then:
      field: responses
      function: schema
      functionOptions:
        schema:
          type: object
          anyOf:
          - required:
            - '200'
          - required:
            - '201'
          - required:
            - '202'
          - required:
            - '204'
  response-description-required:
    description: Responses must have descriptions
    severity: warn
    given: $.paths[*][*].responses[*]
    then:
      field: description
      function: truthy
  schema-type-defined:
    description: Schema properties should have types
    severity: warn
    given: $.components.schemas[*].properties[*]
    then:
      field: type
      function: truthy
  schema-description-required:
    description: Top-level schemas should have descriptions
    severity: info
    given: $.components.schemas[*]
    then:
      field: description
      function: truthy
  security-schemes-defined:
    description: Security schemes should be defined
    severity: warn
    given: $.components
    then:
      field: securitySchemes
      function: truthy
  get-no-request-body:
    description: GET operations should not have a request body
    severity: error
    given: $.paths[*].get
    then:
      field: requestBody
      function: falsy
  delete-no-request-body:
    description: DELETE operations should not have a request body
    severity: warn
    given: $.paths[*].delete
    then:
      field: requestBody
      function: falsy
  servers-expected-domain:
    description: Server URLs should be on the amazonaws.com domain.
    severity: warn
    given: $.servers[*].url
    then:
      function: pattern
      functionOptions:
        match: amazonaws\.com
  path-params-casing:
    description: Path parameters should be PascalCase (the dominant convention in this API).
    severity: warn
    given: $.paths[*].parameters[?(@.in=='path')].name
    then:
      function: casing
      functionOptions:
        type: pascal
  query-params-casing:
    description: Query parameters should be snake_case (the dominant convention in this API).
    severity: warn
    given: $.paths[*][get,post,put,patch,delete].parameters[?(@.in=='query')]
    then:
      field: name
      function: casing
      functionOptions:
        type: snake
  operationid-casing:
    description: Operation IDs should be PascalCase (the dominant convention in this API).
    severity: warn
    given: $.paths[*][get,post,put,patch,delete].operationId
    then:
      function: casing
      functionOptions:
        type: pascal
  schema-names-casing:
    description: Component schema names should be PascalCase (the dominant convention in this API).
    severity: warn
    given: $.components.schemas
    then:
      field: '@key'
      function: casing
      functionOptions:
        type: pascal
  schema-properties-casing:
    description: Schema properties should be PascalCase (the dominant convention in this API).
    severity: warn
    given: $.components.schemas[*].properties
    then:
      field: '@key'
      function: pattern
      functionOptions:
        match: ^[A-Z][A-Za-z0-9]*$
  no-empty-descriptions:
    description: Descriptions must not be empty strings.
    severity: warn
    given: $..description
    then:
      function: truthy