Message Examples Form Complete Mocks
message-examples-form-complete-mocks
info
experience: documentationexperience: usability
spec: channels
{{error}}
Message example must match params examples to form full mocks.
Rule definition
The full Spotlight rule — drop it into a ruleset (.spotlight.yaml / .spectral.yaml) and run it with any Spotlight tool.
message-examples-form-complete-mocks:
title: Message Examples Form Complete Mocks
reference: https://spotlight-rules.com/spec/rules/openapi/message-examples-form-complete-mocks/
description: Message example must match params examples to form full mocks.
message: "{{error}}"
severity: info
given: $.channels.*
then:
function: microcks:aas-verify-mocks
formats:
- aas2
tags:
- format:openapi
- spec:channels
- experience:documentation
- experience:usability
prompt: "You are editing an OpenAPI document to satisfy the Spotlight API
governance rule 'message-examples-form-complete-mocks' (Message Examples
Form Complete Mocks). Requirement: Message example must match params
examples to form full mocks. This rule is evaluated at the JSONPath
`$.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 OpenAPI. 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 OpenAPI document to satisfy the Spotlight API governance rule 'message-examples-form-complete-mocks' (Message Examples Form Complete Mocks). Requirement: Message example must match params examples to form full mocks. This rule is evaluated at the JSONPath `$.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 OpenAPI. Return only the complete corrected document, with no commentary.
| Artifact | OpenAPI |
|---|---|
| Applies at (given) | $.channels.* |
| Severity | info — educational by default; raise to warn/error to enforce |
| Reference | https://spotlight-rules.com/spec/rules/openapi/message-examples-form-complete-mocks/ |