Open JPPortier opened 7 months ago
@mnaumanali94 did you manage to find out the root cause of this issue when triaging it ?
Interestingly it does validate correctly if you use a single OAS example:
requestBodies:
poc-request:
description: This is the request body for sending a message. `app_id`, `recipient`, and `message` are all required fields.
content:
application/json:
schema:
$ref: "#/components/schemas/poc-payload-request"
example:
message:
text_message:
text: "This is a text message."
required: true
Describe the bug
When validating an example with
oneOf
schema, anoas3-valid-media-example
error is reported even if correctTo Reproduce
Given this OpenAPI/AsyncAPI document
spectral-issue-poc.yaml
file content:And this
ruleset.yaml
file:✖ 1 problem (1 error, 0 warnings, 0 infos, 0 hints)