Fluentd · API Governance Rules

Fluentd API Rules

Spectral linting rules defining API design standards and conventions for Fluentd.

5 Rules warn 5
View Rules File View on GitHub

Rule Categories

message no security

Rules

warn
security-schemes-defined
Security schemes should be defined in components.
$.components
warn
message-name-casing
Message names should be PascalCase (the dominant convention in this API).
$.components.messages
warn
message-contenttype-defined
Messages should declare a contentType (set on 100% of this API's messages).
$.components.messages[*]
warn
message-payload-defined
Messages should define a payload schema (set on 100% of this API's messages).
$.components.messages[*]
warn
no-empty-descriptions
Descriptions must not be empty strings.
$..description

Spectral Ruleset

Raw ↑
# fluentd — AsyncAPI Spectral ruleset (strengthened)
# Plain Spectral. Rules measured from this provider's own AsyncAPI event
# conventions by strengthen_asyncapi.py, then self-validated against the spec.
#
# Provenance:
#   - security-schemes: ['sharedKeyAuth']
#   - message-name-casing: pascal @ 100% (n=5)
#   - message-contenttype-defined: 100% adherence
#   - message-payload-defined: 100% adherence
extends:
  - spectral:asyncapi
rules:
  security-schemes-defined:
    description: Security schemes should be defined in components.
    severity: warn
    given: $.components
    then:
      field: securitySchemes
      function: truthy
  message-name-casing:
    description: Message names should be PascalCase (the dominant convention in this API).
    severity: warn
    given: $.components.messages
    then:
      field: '@key'
      function: casing
      functionOptions:
        type: pascal
  message-contenttype-defined:
    description: Messages should declare a contentType (set on 100% of this API's messages).
    severity: warn
    given: $.components.messages[*]
    then:
      field: contentType
      function: truthy
  message-payload-defined:
    description: Messages should define a payload schema (set on 100% of this API's messages).
    severity: warn
    given: $.components.messages[*]
    then:
      field: payload
      function: truthy
  no-empty-descriptions:
    description: Descriptions must not be empty strings.
    severity: warn
    given: $..description
    then:
      function: truthy