Amazon EKS · API Governance Rules

Amazon EKS API Rules

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

39 Rules error 11 warn 23 info 5
View Rules File View on GitHub

Rule Categories

delete examples get info no openapi operation operationid parameter path query response schema security servers tag tags

Rules

warn
info-title-matches-provider
API title should include the provider name (Amazon EKS).
$.info
error
info-description-required
API info must include a description.
$.info
error
info-version-required
API version must be defined.
$.info
warn
info-contact-required
API info should include contact information.
$.info
warn
info-license-required
API info should include license information.
$.info
error
openapi-version-3
OpenAPI specification should use version 3.x.
$
error
servers-defined
At least one server must be defined.
$
warn
servers-https
Server URLs should use HTTPS.
$.servers[*]
info
servers-description
Each server should have a description.
$.servers[*]
error
operation-summary-required
Every operation must have a summary.
$.paths[*][get,post,put,patch,delete,head,options]
warn
operation-summary-provider-prefix
Operation summary should begin with the provider name (Amazon EKS).
$.paths[*][get,post,put,patch,delete,head,options]
warn
operation-description-required
Every operation should have a description.
$.paths[*][get,post,put,patch,delete,head,options]
error
operation-id-required
Every operation must have an operationId.
$.paths[*][get,post,put,patch,delete,head,options]
warn
operation-id-camel-case
OperationId should use camelCase.
$.paths[*][get,post,put,patch,delete,head,options]
error
operation-tags-required
Every operation must have at least one tag.
$.paths[*][get,post,put,patch,delete,head,options]
warn
tags-global-defined
Global tags array should be defined.
$
info
tag-description-required
Each global tag should have a description.
$.tags[*]
warn
parameter-description-required
All parameters must have a description.
$..parameters[*]
error
parameter-schema-required
All parameters must have a schema.
$..parameters[*]
error
response-success-required
Every operation must define at least one 2xx response.
$.paths[*][get,post,put,patch,delete]
error
response-description-required
Every response must have a description.
$.paths[*][*].responses[*]
info
schema-property-description
Schema properties should have descriptions.
$.components.schemas[*].properties[*]
warn
schema-type-defined
Schemas should define a type.
$.components.schemas[*]
warn
security-schemes-defined
Security schemes should be defined in components.
$.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
no-empty-descriptions
Descriptions should not be empty strings.
$..description
info
examples-encouraged
Operations should include examples for better documentation.
$.paths[*][get,post,put,patch,delete]
warn
servers-expected-domain
Server URLs should be on the amazonaws.com domain.
$.servers[*].url
warn
path-params-casing
Path parameters should be snake_case (the dominant convention in this API).
$.paths[*].parameters[?(@.in=='path')].name
warn
query-params-casing
Query parameters should be camelCase (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
info
schema-properties-casing
Schema properties should be camelCase (the dominant convention in this API).
$.components.schemas[*].properties
warn
operation-documents-400
Operations should document a 400 response (documented on 100% of this API's operations).
$.paths[*][get,post,put,patch,delete].responses
warn
operation-documents-403
Operations should document a 403 response (documented on 100% of this API's operations).
$.paths[*][get,post,put,patch,delete].responses
warn
operation-documents-404
Operations should document a 404 response (documented on 88% of this API's operations).
$.paths[*][get,post,put,patch,delete].responses
warn
operation-documents-429
Operations should document a 429 response (documented on 100% of this API's operations).
$.paths[*][get,post,put,patch,delete].responses
warn
operation-documents-500
Operations should document a 500 response (documented on 100% of this API's operations).
$.paths[*][get,post,put,patch,delete].responses

Spectral Ruleset

Raw ↑
# amazon-eks — 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: snake @ 70% (n=20)
#   - query-params-casing: camel @ 100% (n=8)
#   - operationid-casing: pascal @ 100% (n=16)
#   - schema-names-casing: pascal @ 100% (n=29)
#   - schema-properties-casing: camel @ 61% (n=109)
#   - operation-documents-400: 100% adherence
#   - operation-documents-403: 100% adherence
#   - operation-documents-404: 88% adherence
#   - operation-documents-429: 100% adherence
#   - operation-documents-500: 100% adherence
#   - pagination params observed: ['maxResults', 'nextToken']
#   - merge: kept 28 existing, added 11 measured, upgraded 0
#   - added: servers-expected-domain, path-params-casing, query-params-casing, operationid-casing, schema-names-casing, schema-properties-casing, operation-documents-400, operation-documents-403, operation-documents-404, operation-documents-429, operation-documents-500
extends:
  - spectral:oas
rules:
  info-title-matches-provider:
    description: API title should include the provider name (Amazon EKS).
    severity: warn
    given: $.info
    then:
      field: title
      function: pattern
      functionOptions:
        match: ^Amazon EKS
  info-description-required:
    description: API info must include a description.
    severity: error
    given: $.info
    then:
      field: description
      function: truthy
  info-version-required:
    description: API version must be defined.
    severity: error
    given: $.info
    then:
      field: version
      function: truthy
  info-contact-required:
    description: API info should include contact information.
    severity: warn
    given: $.info
    then:
      field: contact
      function: truthy
  info-license-required:
    description: API info should include license information.
    severity: warn
    given: $.info
    then:
      field: license
      function: truthy
  openapi-version-3:
    description: OpenAPI specification should use version 3.x.
    severity: error
    given: $
    then:
      field: openapi
      function: pattern
      functionOptions:
        match: ^3\.
  servers-defined:
    description: At least one server must be defined.
    severity: error
    given: $
    then:
      field: servers
      function: truthy
  servers-https:
    description: Server URLs should use HTTPS.
    severity: warn
    given: $.servers[*]
    then:
      field: url
      function: pattern
      functionOptions:
        match: ^https://
  servers-description:
    description: Each server should have a description.
    severity: info
    given: $.servers[*]
    then:
      field: description
      function: truthy
  operation-summary-required:
    description: Every operation must have a summary.
    severity: error
    given: $.paths[*][get,post,put,patch,delete,head,options]
    then:
      field: summary
      function: truthy
  operation-summary-provider-prefix:
    description: Operation summary should begin with the provider name (Amazon EKS).
    severity: warn
    given: $.paths[*][get,post,put,patch,delete,head,options]
    then:
      field: summary
      function: pattern
      functionOptions:
        match: ^Amazon EKS
  operation-description-required:
    description: Every operation should have a description.
    severity: warn
    given: $.paths[*][get,post,put,patch,delete,head,options]
    then:
      field: description
      function: truthy
  operation-id-required:
    description: Every operation must have an operationId.
    severity: error
    given: $.paths[*][get,post,put,patch,delete,head,options]
    then:
      field: operationId
      function: truthy
  operation-id-camel-case:
    description: OperationId should use camelCase.
    severity: warn
    given: $.paths[*][get,post,put,patch,delete,head,options]
    then:
      field: operationId
      function: pattern
      functionOptions:
        match: ^[a-z][a-zA-Z0-9]*$
  operation-tags-required:
    description: Every operation must have at least one tag.
    severity: error
    given: $.paths[*][get,post,put,patch,delete,head,options]
    then:
      field: tags
      function: truthy
  tags-global-defined:
    description: Global tags array should be defined.
    severity: warn
    given: $
    then:
      field: tags
      function: truthy
  tag-description-required:
    description: Each global tag should have a description.
    severity: info
    given: $.tags[*]
    then:
      field: description
      function: truthy
  parameter-description-required:
    description: All parameters must have a description.
    severity: warn
    given: $..parameters[*]
    then:
      field: description
      function: truthy
  parameter-schema-required:
    description: All parameters must have a schema.
    severity: error
    given: $..parameters[*]
    then:
      field: schema
      function: truthy
  response-success-required:
    description: Every operation must define at least one 2xx response.
    severity: error
    given: $.paths[*][get,post,put,patch,delete]
    then:
      field: responses
      function: schema
      functionOptions:
        schema:
          type: object
          minProperties: 1
  response-description-required:
    description: Every response must have a description.
    severity: error
    given: $.paths[*][*].responses[*]
    then:
      field: description
      function: truthy
  schema-property-description:
    description: Schema properties should have descriptions.
    severity: info
    given: $.components.schemas[*].properties[*]
    then:
      field: description
      function: truthy
  schema-type-defined:
    description: Schemas should define a type.
    severity: warn
    given: $.components.schemas[*]
    then:
      field: type
      function: truthy
  security-schemes-defined:
    description: Security schemes should be defined in components.
    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
  no-empty-descriptions:
    description: Descriptions should not be empty strings.
    severity: warn
    given: $..description
    then:
      function: pattern
      functionOptions:
        match: .+
  examples-encouraged:
    description: Operations should include examples for better documentation.
    severity: info
    given: $.paths[*][get,post,put,patch,delete]
    then:
      field: responses
      function: truthy
  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 snake_case (the dominant convention in this API).
    severity: warn
    given: $.paths[*].parameters[?(@.in=='path')].name
    then:
      function: casing
      functionOptions:
        type: snake
  query-params-casing:
    description: Query parameters should be camelCase (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: camel
  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 camelCase (the dominant convention in this API).
    severity: info
    given: $.components.schemas[*].properties
    then:
      field: '@key'
      function: casing
      functionOptions:
        type: camel
  operation-documents-400:
    description: Operations should document a 400 response (documented on 100% of this API's operations).
    severity: warn
    given: $.paths[*][get,post,put,patch,delete].responses
    then:
      field: '400'
      function: truthy
  operation-documents-403:
    description: Operations should document a 403 response (documented on 100% of this API's operations).
    severity: warn
    given: $.paths[*][get,post,put,patch,delete].responses
    then:
      field: '403'
      function: truthy
  operation-documents-404:
    description: Operations should document a 404 response (documented on 88% of this API's operations).
    severity: warn
    given: $.paths[*][get,post,put,patch,delete].responses
    then:
      field: '404'
      function: truthy
  operation-documents-429:
    description: Operations should document a 429 response (documented on 100% of this API's operations).
    severity: warn
    given: $.paths[*][get,post,put,patch,delete].responses
    then:
      field: '429'
      function: truthy
  operation-documents-500:
    description: Operations should document a 500 response (documented on 100% of this API's operations).
    severity: warn
    given: $.paths[*][get,post,put,patch,delete].responses
    then:
      field: '500'
      function: truthy