lerenn / asyncapi-codegen

An AsyncAPI Golang Code generator that generates all Go code from the broker to the application/user. Just plug your application to your favorite message broker!
Apache License 2.0
91 stars 23 forks source link

feature: support JSON-Schema validation #218

Closed TheSadlig closed 4 months ago

TheSadlig commented 4 months ago

Adding support for basic json-schema validations. Related to #131

A few notes:

Please let me know if you need any change or information

Thanks TheSadlig

lerenn commented 4 months ago

Hello @TheSadlig ! Thanks for the PR ! It is really valuable ☺️ I'll review it in the next days !

TheSadlig commented 4 months ago

@lerenn Actually, my use-case requires asyncapi v2, so I updated the PR to include this, moving the fields related to validations to a struct that is embedded in both V2 and V3. It avoids having to duplicate the Validation field generation for both versions.

Whenever you have the time ;)

lerenn commented 4 months ago

Just fixed the linting to avoid another ping-pong, so we're good to go !