-
-
Notifications
You must be signed in to change notification settings - Fork 288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE REQUEST] Sample to define AsyncAPI Schema with references to protobuf schema definitions #239
Comments
Hey @racheliurui. I'm afraid we'll not support protobuf in version 2 for now. We found some challenges and looks like it will need more thinking. One of them being #216. In the meantime, you may want to convert protobuf to jsonschema so you can use it on AsyncAPI. You can automate this process using https://github.com/devongovett/protobuf-jsonschema. Hope it helps! |
@fmvilas thanks for the explanation. So is it confirmed that version 2 official version won't support protobuf? BTW, We will put into consideration of the tools to do transformation between jsonschema and protobuf, but eventually, the payload we want to use protobuf (as it's quite mature). |
Yes, it is confirmed. During RC1 we found some questions that weren't clear so we're being conservative here. Injecting non-JSON schemas into a JSON object is possible but raises a lot of issues because some of the artifacts of the spec (like $ref and JSON Pointers) are not meant for non-JSON structures. It doesn't mean we give up. We're just being cautious and I hope we can make it for 2.1.0. My suggestion, for now, is that you automate the conversion from protobuf to jsonschema in your CI system. You work on the protobuf version and reference the jsonschema one from your AsyncAPI documents. I know it's not the best UX but should be enough for you to continue until we give first-class support for protobuf. Sorry for this. |
Thanks, @fmvilas |
Thank you, @racheliurui. We'll do all that's in our hands to make it happen :) |
It's been almost 2 years, are protobufs out of the picture for good? |
@dskvr @saryeHaddadi, @juanitocalero, @simonbrownsw, @eliasrdrgz, @conbon fyi we had a chat about it on our |
thanks — i worked around it as suggested (by auto-generating jsonschema from the protobufs as part of ci build pipeline, with |
I have tried to modify the streetlights.yml sample to achieve below goals,
The sample api is hotsted at below location,
https://github.com/etpartners-com-au/asyncapi-schema-sample/blob/master/SampleAPI.yaml
The issue I currently found is,
I haven't found a validator to help me validate the modified yml, so currently it's hard to me to understand how to draft the api schema to meet my 2 goals
Hope some feedback regards to this. As we are thinking of changing an existing XSD schema lib into proto3 and using AsyncAPI to define the event based interfaces.
Thanks very much !
The text was updated successfully, but these errors were encountered: