AWS Step Functions · API Governance Rules

AWS Step Functions API Rules

Spectral linting rules defining API design standards and conventions for AWS Step Functions.

8 Rules error 4 warn 3 info 1
View Rules File View on GitHub

Rule Categories

sfn

Rules

warn
sfn-operation-summary
All operations must have a summary starting with "AWS Step Functions"
$.paths[*][get,post,put,delete,patch]
error
sfn-operation-id
All operations must have an operationId
$.paths[*][get,post,put,delete,patch]
error
sfn-info-title
Info object must have a title
$.info
error
sfn-info-version
Info object must have a version
$.info
error
sfn-response-description
All responses must have a description
$.paths[*][*].responses[*]
info
sfn-microcks-annotation
Operations should have x-microcks-operation annotation
$.paths[*][get,post,put,delete,patch]
warn
sfn-schema-type
Schema components should have a type
$.components.schemas[*]
warn
sfn-security-defined
API security schemes should be defined
$

Spectral Ruleset

Raw ↑
rules:
  sfn-operation-summary:
    description: All operations must have a summary starting with "AWS Step Functions"
    severity: warn
    given: "$.paths[*][get,post,put,delete,patch]"
    then:
      field: summary
      function: pattern
      functionOptions:
        match: "^AWS Step Functions"
  sfn-operation-id:
    description: All operations must have an operationId
    severity: error
    given: "$.paths[*][get,post,put,delete,patch]"
    then:
      field: operationId
      function: truthy
  sfn-info-title:
    description: Info object must have a title
    severity: error
    given: "$.info"
    then:
      field: title
      function: truthy
  sfn-info-version:
    description: Info object must have a version
    severity: error
    given: "$.info"
    then:
      field: version
      function: truthy
  sfn-response-description:
    description: All responses must have a description
    severity: error
    given: "$.paths[*][*].responses[*]"
    then:
      field: description
      function: truthy
  sfn-microcks-annotation:
    description: Operations should have x-microcks-operation annotation
    severity: info
    given: "$.paths[*][get,post,put,delete,patch]"
    then:
      field: x-microcks-operation
      function: truthy
  sfn-schema-type:
    description: Schema components should have a type
    severity: warn
    given: "$.components.schemas[*]"
    then:
      field: type
      function: truthy
  sfn-security-defined:
    description: API security schemes should be defined
    severity: warn
    given: "$"
    then:
      field: components.securitySchemes
      function: truthy