Apache Helix · API Governance Rules

Apache Helix API Rules

Spectral linting rules defining API design standards and conventions for Apache Helix.

8 Rules error 2 warn 5 info 1
View Rules File View on GitHub

Rule Categories

helix

Rules

error
helix-operation-summary
All Helix REST API operations must have a summary
$.paths[*][get,put,post,delete,patch]
error
helix-operation-id
All Helix REST API operations must have an operationId
$.paths[*][get,put,post,delete,patch]
warn
helix-operation-tags
All Helix REST API operations must have at least one tag
$.paths[*][get,put,post,delete,patch]
warn
helix-schema-description
All Helix schema components must have a description
$.components.schemas[*]
info
helix-property-description
All Helix schema properties should have descriptions
$.components.schemas[*].properties[*]
warn
helix-info-contact
API info must include contact information
$.info
warn
helix-info-license
API info must include license information
$.info
warn
helix-path-parameters-described
All Helix path parameters must have descriptions
$.paths[*][*].parameters[?(@.in=='path')]

Spectral Ruleset

Raw ↑
rules:
  helix-operation-summary:
    description: All Helix REST API operations must have a summary
    severity: error
    given: "$.paths[*][get,put,post,delete,patch]"
    then:
      field: summary
      function: truthy

  helix-operation-id:
    description: All Helix REST API operations must have an operationId
    severity: error
    given: "$.paths[*][get,put,post,delete,patch]"
    then:
      field: operationId
      function: truthy

  helix-operation-tags:
    description: All Helix REST API operations must have at least one tag
    severity: warn
    given: "$.paths[*][get,put,post,delete,patch]"
    then:
      field: tags
      function: truthy

  helix-schema-description:
    description: All Helix schema components must have a description
    severity: warn
    given: "$.components.schemas[*]"
    then:
      field: description
      function: truthy

  helix-property-description:
    description: All Helix schema properties should have descriptions
    severity: info
    given: "$.components.schemas[*].properties[*]"
    then:
      field: description
      function: truthy

  helix-info-contact:
    description: API info must include contact information
    severity: warn
    given: "$.info"
    then:
      field: contact
      function: truthy

  helix-info-license:
    description: API info must include license information
    severity: warn
    given: "$.info"
    then:
      field: license
      function: truthy

  helix-path-parameters-described:
    description: All Helix path parameters must have descriptions
    severity: warn
    given: "$.paths[*][*].parameters[?(@.in=='path')]"
    then:
      field: description
      function: truthy