Asyncapi Channel Parameters
asyncapi-channel-parameters · built-in
info
experience: reliabilityexperience: consistency
spec: channelsspec: components
{{error}}
Channel parameters must be defined and there must be no redundant parameters.
Rule definition
The full Spotlight rule — drop it into a ruleset (.spotlight.yaml / .spectral.yaml) and run it with any Spotlight tool.
asyncapi-channel-parameters:
title: Asyncapi Channel Parameters
reference: https://spotlight-rules.com/spec/rules/asyncapi/asyncapi-channel-parameters/
description: Channel parameters must be defined and there must be no redundant parameters.
message: "{{error}}"
severity: info
given:
- $.channels.*
- $.components.channels.*
then:
function: asyncApiChannelParameters
tags:
- format:asyncapi
- spec:channels
- spec:components
- experience:reliability
- experience:consistency
prompt: "You are editing an AsyncAPI document to satisfy the Spotlight API
governance rule 'asyncapi-channel-parameters' (Asyncapi Channel Parameters).
Requirement: Channel parameters must be defined and there must be no
redundant parameters. This rule is evaluated at the JSONPath `$.channels.* |
$.components.channels.*` — inspect every location it matches and correct
only what violates the rule. Make the smallest change that satisfies the
rule, leave all unrelated content, key order, comments, and formatting
unchanged, and keep the document valid AsyncAPI. Return only the complete
corrected document, with no commentary."
AI fix prompt — send this to Claude, Gemini, or ChatGPT with your artifact to auto-fix this rule
You are editing an AsyncAPI document to satisfy the Spotlight API governance rule 'asyncapi-channel-parameters' (Asyncapi Channel Parameters). Requirement: Channel parameters must be defined and there must be no redundant parameters. This rule is evaluated at the JSONPath `$.channels.* | $.components.channels.*` — inspect every location it matches and correct only what violates the rule. Make the smallest change that satisfies the rule, leave all unrelated content, key order, comments, and formatting unchanged, and keep the document valid AsyncAPI. Return only the complete corrected document, with no commentary.
| Artifact | AsyncAPI |
|---|---|
| Applies at (given) | $.channels.* | $.components.channels.* |
| Severity | info — educational by default; raise to warn/error to enforce |
| Reference | https://spotlight-rules.com/spec/rules/asyncapi/asyncapi-channel-parameters/ |