Apache Hudi · API Governance Rules

Apache Hudi API Rules

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

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

Rule Categories

hudi

Rules

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

Spectral Ruleset

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

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

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

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

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

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

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

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