Amazon Neptune · API Governance Rules

Amazon Neptune API Rules

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

32 Rules error 11 warn 17 info 4
View Rules File View on GitHub

Rule Categories

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

Rules

warn
info-title-format
API title should start with "Amazon Neptune"
$.info.title
error
info-description-required
Info object must have a description of at least 50 characters
$.info
error
info-version-required
Info object must have a version
$.info
warn
openapi-version-3
OpenAPI version should be 3.x
$.openapi
error
servers-required
Servers must be defined
$
error
server-https-required
Server URLs must use HTTPS
$.servers[*].url
warn
paths-kebab-case
Path segments should use kebab-case
$.paths[*]~
warn
paths-no-trailing-slash
Paths should not have a trailing slash
$.paths[*]~
error
operation-summary-required
Operations must have a summary
$.paths[*][get,post,put,patch,delete,head,options]
warn
operation-summary-amazon-prefix
Operation summaries should start with "Amazon Neptune"
$.paths[*][get,post,put,patch,delete].summary
warn
operation-description-required
Operations must have a description
$.paths[*][get,post,put,patch,delete,head,options]
error
operation-id-required
Operations must have an operationId
$.paths[*][get,post,put,patch,delete,head,options]
warn
operation-id-camel-case
OperationIds should use camelCase
$.paths[*][get,post,put,patch,delete].operationId
warn
operation-tags-required
Operations must have at least one tag
$.paths[*][get,post,put,patch,delete,head,options]
warn
parameter-description-required
Parameters must have a description
$.paths[*][get,post,put,patch,delete].parameters[*]
error
parameter-schema-required
Parameters must have a schema
$.paths[*][get,post,put,patch,delete].parameters[*]
error
response-success-required
Operations must have a success response (2xx)
$.paths[*][get,post,put,patch,delete].responses
error
response-description-required
Response objects must have a description
$.paths[*][get,post,put,patch,delete].responses[*]
info
response-401-required
Authenticated operations should have a 401 response
$.paths[*][get,post,put,patch,delete]
info
schema-property-description
Schema properties should have descriptions
$.components.schemas[*].properties[*]
warn
schema-type-required
Schemas should define a type
$.components.schemas[*]
error
security-scheme-defined
Security schemes must 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
info
operation-examples-encouraged
Operations should include examples for better developer experience
$.paths[*][get,post,put,patch,delete].responses[*].content[*]
warn
servers-expected-domain
Server URLs should be on the amazonaws.com domain.
$.servers[*].url
warn
path-params-casing
Path parameters should be camelCase (the dominant convention in this API).
$.paths[*].parameters[?(@.in=='path')].name
warn
query-params-casing
Query parameters should be PascalCase (the dominant convention in this API).
$.paths[*][get,post,put,patch,delete].parameters[?(@.in=='query')]
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
error-schema-defined
A shared error schema (ErrorResponse) should be defined for error payloads.
$.components.schemas
warn
no-empty-descriptions
Descriptions must not be empty strings.
$..description

Spectral Ruleset

Raw ↑
# amazon-neptune — 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: 3/3 servers on amazonaws.com
#   - path-params-casing: camel @ 82% (n=45)
#   - query-params-casing: pascal @ 62% (n=224)
#   - operationid-casing: camel @ 100% (n=130)
#   - schema-names-casing: pascal @ 100% (n=93)
#   - schema-properties-casing: camel @ 47% (n=506)
#   - security: global (root) — NOT emitting operation-security-required
#   - error-schema-defined: ErrorResponse
#   - pagination params observed: ['limit', 'maxResults', 'nextToken', 'page']
#   - merge: kept 25 existing, added 7 measured, upgraded 0
#   - added: servers-expected-domain, path-params-casing, query-params-casing, schema-names-casing, schema-properties-casing, error-schema-defined, no-empty-descriptions
extends:
  - spectral:oas
rules:
  info-title-format:
    description: API title should start with "Amazon Neptune"
    severity: warn
    given: $.info.title
    then:
      function: pattern
      functionOptions:
        match: ^Amazon Neptune
  info-description-required:
    description: Info object must have a description of at least 50 characters
    severity: error
    given: $.info
    then:
      field: description
      function: truthy
  info-version-required:
    description: Info object must have a version
    severity: error
    given: $.info
    then:
      field: version
      function: truthy
  openapi-version-3:
    description: OpenAPI version should be 3.x
    severity: warn
    given: $.openapi
    then:
      function: pattern
      functionOptions:
        match: ^3\.
  servers-required:
    description: Servers must be defined
    severity: error
    given: $
    then:
      field: servers
      function: truthy
  server-https-required:
    description: Server URLs must use HTTPS
    severity: error
    given: $.servers[*].url
    then:
      function: pattern
      functionOptions:
        match: ^https://
  paths-kebab-case:
    description: Path segments should use kebab-case
    severity: warn
    given: $.paths[*]~
    then:
      function: pattern
      functionOptions:
        match: ^(/[a-z0-9][a-z0-9-]*)*(/\{[a-zA-Z][a-zA-Z0-9_]*\})*$
  paths-no-trailing-slash:
    description: Paths should not have a trailing slash
    severity: warn
    given: $.paths[*]~
    then:
      function: pattern
      functionOptions:
        notMatch: /$
  operation-summary-required:
    description: Operations must have a summary
    severity: error
    given: $.paths[*][get,post,put,patch,delete,head,options]
    then:
      field: summary
      function: truthy
  operation-summary-amazon-prefix:
    description: Operation summaries should start with "Amazon Neptune"
    severity: warn
    given: $.paths[*][get,post,put,patch,delete].summary
    then:
      function: pattern
      functionOptions:
        match: ^Amazon Neptune
  operation-description-required:
    description: Operations must have a description
    severity: warn
    given: $.paths[*][get,post,put,patch,delete,head,options]
    then:
      field: description
      function: truthy
  operation-id-required:
    description: Operations 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: OperationIds should use camelCase
    severity: warn
    given: $.paths[*][get,post,put,patch,delete].operationId
    then:
      function: pattern
      functionOptions:
        match: ^[a-z][a-zA-Z0-9]*$
  operation-tags-required:
    description: Operations must have at least one tag
    severity: warn
    given: $.paths[*][get,post,put,patch,delete,head,options]
    then:
      field: tags
      function: truthy
  parameter-description-required:
    description: Parameters must have a description
    severity: warn
    given: $.paths[*][get,post,put,patch,delete].parameters[*]
    then:
      field: description
      function: truthy
  parameter-schema-required:
    description: Parameters must have a schema
    severity: error
    given: $.paths[*][get,post,put,patch,delete].parameters[*]
    then:
      field: schema
      function: truthy
  response-success-required:
    description: Operations must have a success response (2xx)
    severity: error
    given: $.paths[*][get,post,put,patch,delete].responses
    then:
      function: schema
      functionOptions:
        schema:
          anyOf:
          - required:
            - '200'
          - required:
            - '201'
          - required:
            - '202'
          - required:
            - '204'
  response-description-required:
    description: Response objects must have a description
    severity: error
    given: $.paths[*][get,post,put,patch,delete].responses[*]
    then:
      field: description
      function: truthy
  response-401-required:
    description: Authenticated operations should have a 401 response
    severity: info
    given: $.paths[*][get,post,put,patch,delete]
    then:
      function: schema
      functionOptions:
        schema:
          properties:
            responses:
              required:
              - '401'
  schema-property-description:
    description: Schema properties should have descriptions
    severity: info
    given: $.components.schemas[*].properties[*]
    then:
      field: description
      function: truthy
  schema-type-required:
    description: Schemas should define a type
    severity: warn
    given: $.components.schemas[*]
    then:
      field: type
      function: truthy
  security-scheme-defined:
    description: Security schemes must be defined in components
    severity: error
    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
  operation-examples-encouraged:
    description: Operations should include examples for better developer experience
    severity: info
    given: $.paths[*][get,post,put,patch,delete].responses[*].content[*]
    then:
      function: schema
      functionOptions:
        schema:
          anyOf:
          - required:
            - example
          - required:
            - examples
  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 camelCase (the dominant convention in this API).
    severity: warn
    given: $.paths[*].parameters[?(@.in=='path')].name
    then:
      function: casing
      functionOptions:
        type: camel
  query-params-casing:
    description: Query parameters should be PascalCase (the dominant convention in this API).
    severity: warn
    given: $.paths[*][get,post,put,patch,delete].parameters[?(@.in=='query')]
    then:
      field: name
      function: pattern
      functionOptions:
        match: ^[A-Z][A-Za-z0-9]*$
  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: pattern
      functionOptions:
        match: ^[A-Z][A-Za-z0-9]*$
  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: pattern
      functionOptions:
        match: ^[a-z][A-Za-z0-9]*$
  error-schema-defined:
    description: A shared error schema (ErrorResponse) should be defined for error payloads.
    severity: warn
    given: $.components.schemas
    then:
      field: ErrorResponse
      function: truthy
  no-empty-descriptions:
    description: Descriptions must not be empty strings.
    severity: warn
    given: $..description
    then:
      function: truthy