Asyncapi Operation OperationId Uniqueness
asyncapi-operation-operationId-uniqueness · built-in
info
experience: consistencyexperience: namingexperience: reliability
spec: document
"operationId" must be unique across all the operations.
“operationId” must be unique across all the operations.
Rule definition
The full Spotlight rule — drop it into a ruleset (.spotlight.yaml / .spectral.yaml) and run it with any Spotlight tool.
asyncapi-operation-operationId-uniqueness:
title: Asyncapi Operation OperationId Uniqueness
reference: https://spotlight-rules.com/spec/rules/asyncapi/asyncapi-operation-operationId-uniqueness/
description: '"operationId" must be unique across all the operations.'
message: '"operationId" must be unique across all the operations.'
severity: info
given: $
then:
function: asyncApi2OperationIdUniqueness
tags:
- format:asyncapi
- spec:document
- experience:consistency
- experience:naming
- experience:reliability
prompt: "You are editing an AsyncAPI document to satisfy the Spotlight API
governance rule 'asyncapi-operation-operationId-uniqueness' (Asyncapi
Operation OperationId Uniqueness). Requirement: \"operationId\" must be
unique across all the operations. 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-operation-operationId-uniqueness' (Asyncapi Operation OperationId Uniqueness). Requirement: "operationId" must be unique across all the operations. 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) | $ |
| Severity | info — educational by default; raise to warn/error to enforce |
| Reference | https://spotlight-rules.com/spec/rules/asyncapi/asyncapi-operation-operationId-uniqueness/ |