Jito Labs · API Governance Rules

Jito Labs API Rules

Spectral linting rules defining API design standards and conventions for Jito Labs.

6 Rules warn 6
View Rules File View on GitHub

Rule Categories

channel message no operation payload

Rules

warn
channel-key-casing
Channel names should be camelCase (the dominant convention in this API).
$.channels
warn
message-name-casing
Message names should be PascalCase (the dominant convention in this API).
$.components.messages
warn
payload-property-casing
Message payload properties should be snake_case (the dominant convention in this API).
$.components.schemas[*].properties
warn
operation-id-casing
Operation names should be camelCase (the dominant convention in this API).
$.operations
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 ↑
# jito — 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:
#   - channel-key-casing: camel @ 100% (n=3)
#   - message-name-casing: pascal @ 100% (n=3)
#   - payload-property-casing: snake @ 100% (n=14)
#   - operation-id-casing: camel @ 100% (n=3, v3)
#   - message-payload-defined: 100% adherence
extends:
  - spectral:asyncapi
rules:
  channel-key-casing:
    description: Channel names should be camelCase (the dominant convention in this API).
    severity: warn
    given: $.channels
    then:
      field: '@key'
      function: casing
      functionOptions:
        type: camel
  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
  payload-property-casing:
    description: Message payload properties should be snake_case (the dominant convention in this API).
    severity: warn
    given: $.components.schemas[*].properties
    then:
      field: '@key'
      function: casing
      functionOptions:
        type: snake
  operation-id-casing:
    description: Operation names should be camelCase (the dominant convention in this API).
    severity: warn
    given: $.operations
    then:
      field: '@key'
      function: casing
      functionOptions:
        type: camel
  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