You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The spectral rule asyncApi2SchemaValidation currently enforces that all examples have the same type as the schema type. However, we believe that there are cases in AsyncAPI, where it is needed to accept string examples regardless of the schema type.
We had to change the version to 2.6.0, as the cli does not support 3.0.0 yet
See the error: 66:11 error asyncapi-schema-examples "0" property type must be object components.schemas.io.github.springwolf.examples.kafka.dtos.XmlPayloadDto.examples[0]
Expected behavior
No error/validation message
Screenshots
N/A
Environment (remove any that are not applicable):
Library version: develop
Additional context
We are embedding xml and/or yaml as string in examples in an AsyncAPI (JSON) document.
Describe the bug
The spectral rule
asyncApi2SchemaValidation
currently enforces that allexamples
have the same type as the schematype
. However, we believe that there are cases in AsyncAPI, where it is needed to acceptstring
examples regardless of the schematype
.To Reproduce
string
in Message Example Object field payload for non-json payloads (like xml, yaml) asyncapi/spec#1038 (comment)spectral lint --ruleset rule.yaml test.yaml
rule.yaml
:extends: "spectral:asyncapi"
2.6.0
, as the cli does not support3.0.0
yet66:11 error asyncapi-schema-examples "0" property type must be object components.schemas.io.github.springwolf.examples.kafka.dtos.XmlPayloadDto.examples[0]
Expected behavior
No error/validation message
Screenshots
N/A
Environment (remove any that are not applicable):
Additional context
We are embedding xml and/or yaml as string in examples in an AsyncAPI (JSON) document.
Relates to asyncapi/spec#1038
The text was updated successfully, but these errors were encountered: