Apache Ozone · API Governance Rules

Apache Ozone API Rules

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

6 Rules error 3 warn 1 info 2
View Rules File View on GitHub

Rule Categories

info operation paths security

Rules

error
info-title-required
API must have a title
$.info
error
operation-summary-required
$.paths[*][*]
error
operation-operationId-required
$.paths[*][*]
info
operation-summary-apache-prefix
Summaries should start with Apache Ozone
$.paths[*][get,post,put,delete,patch,head].summary
info
paths-s3-compatible
Paths should follow S3 bucket/key pattern
$.paths[*]~
warn
security-s3-auth
S3 API should use AWS Signature authentication
$.info

Spectral Ruleset

Raw ↑
extends: "spectral:oas"
rules:
  info-title-required:
    description: "API must have a title"
    severity: error
    given: "$.info"
    then:
      field: title
      function: truthy
  operation-summary-required:
    severity: error
    given: "$.paths[*][*]"
    then:
      field: summary
      function: truthy
  operation-operationId-required:
    severity: error
    given: "$.paths[*][*]"
    then:
      field: operationId
      function: truthy
  operation-summary-apache-prefix:
    description: "Summaries should start with Apache Ozone"
    severity: info
    given: "$.paths[*][get,post,put,delete,patch,head].summary"
    then:
      function: pattern
      functionOptions:
        match: "^Apache Ozone"
  paths-s3-compatible:
    description: "Paths should follow S3 bucket/key pattern"
    severity: info
    given: "$.paths[*]~"
    then:
      function: pattern
      functionOptions:
        match: "^/[{a-z]"
  security-s3-auth:
    description: "S3 API should use AWS Signature authentication"
    severity: warn
    given: "$.info"
    then:
      field: description
      function: truthy