Re:AsyncAPI vs. OpenAPI: Answers to Your Burning Questions
by panabee on Thursday September 09, 2021 @03:27PM
(#28473627)
would you mind sharing what you mean by auto-generated validators that get injected into the code?
Re:AsyncAPI vs. OpenAPI: Answers to Your Burning Questions
by dnautics on Thursday September 09, 2021 @06:42PM
(#28475540)
I'll be open sourcing one I'm building for openApi at work in a few months, in the meantime, I have compile-time generated jsonschema validators here:
https://hexdocs.pm/exonerate/Exonerate.html
In elixir parlance checking the schemas for REST (or in the case of asyncAPI, ws) transactions will happen based on a "plug" which injects the validation into the processing pipeline.
It wasn't really ready for that yet at the time, but I think over time AsyncAPI will be the way to go.
[0] in retrospect probably would have been better as a normal MVC app with only the chat and audio parts over ws, but... Again, not my project.