spec: Possible bug with example - adeo-kafka-request-reply-asyncapi
Hi!
I’m not sure, but looks like this example is broken - https://github.com/asyncapi/spec/blob/master/examples/adeo-kafka-request-reply-asyncapi.yml
I checked It in Studio - no warnings, but when I tried to parse this example using JAsyncAPI I enfaced with errors
I found two strange things:
- extensions
bindings:
kafka:
x-key.subject.name.strategy:
type: string
description: >
We use the RecordNameStrategy to infer the messages schema. Use
`key.subject.name.strategy=io.confluent.kafka.serializers.subject.RecordNameStrategy`
in your consumer configuration.
x-value.subject.name.strategy:
type: string
description: >
We use the RecordNameStrategy to infer the messages schema. Use
`value.subject.name.strategy=io.confluent.kafka.serializers.subject.RecordNameStrategy`
in your consumer configuration.
This property name x-key.subject.name.strategy
must not be interpreted as valid because of our regex ^x-[\w\d\-\_]+$
or not?
- Schema structure
CorrelationId:
type: string
format: uuid
description: >-
A unique Correlation ID defined from the `REQUEST_ID` or the
`MESSAGE_ID` provided in the Costing Request.
example: 1fa6ef40-8f47-40a8-8cf6-f8607d0066ef
I may be wrong, but draft-07 doesn’t have such field, only examples or not?
About this issue
- Original URL
- State: open
- Created 5 months ago
- Comments: 17 (17 by maintainers)
Commits related to this issue
- docs: fix adeo-kafka-request-reply-asyncapi.yml - replace example with examples https://github.com/asyncapi/spec/issues/1031 — committed to Pakisan/asyncapi by Pakisan 5 months ago
- docs: fix Specification Extensions Field Pattern https://github.com/asyncapi/spec/issues/1031 — committed to Pakisan/asyncapi by Pakisan 5 months ago
I agree, unless allowing dots in the extension name has an edge case I can’t see.
Yes, you are right. We need to discuss and decide which pattern to use.
That’s why I requested clarification. Because are using description from out website and not digging into our JSON Schemas, to write specs, and that’s is a reason why I receive issues, with parsing errors, from users
I’ll create MR with fix for adeo example, tonight
Reason for the failed validation is
RequesterCode
andBuCode
have example values as integer, NOT string.i.e. should be the following:
It’s a YAML syntax where lone numbers without characters are interpreted as integer not string by default as you see in the other examples.
However… The error codes SUCKS and does not explain it in studio 👎
merged now btw! 🎉 🚀
Yep, I’m agree with you. Will close this issue as resolved, after MR with fix for regex will be merged
After that I’ll create new issue to refresh discussion about field from OAS schema and will provide related issues from jasyncapi and modelina