Open Irvenae opened 5 months ago
I think that would be a great idea ! If you have any thought about the go lib that we could use, that would be great.
Also, if you want to give it a try, PR are welcome :)
Seems like validator v10 is the way to go https://dev.to/sanjaysinghrajpoot/adding-json-validation-to-structs-in-go-lang-4mg8.
So I guess it might be already good enough to add the tags to the struct. People could add their own validator in the middleware to check this. We could provide one in the extensions that uses validator v10.
I'm busy on the AsyncAPI V3 support for now, but I'll take look after that :)
Should we add validation for JSON schema core values?
https://json-schema.org/draft/2020-12/json-schema-validation
could be middleware which is automatically added or a defaultValidation middleware which is up to the client to add?