Skip to content
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

validation JSON schema #131

Open
Irvenae opened this issue Feb 13, 2024 · 3 comments
Open

validation JSON schema #131

Irvenae opened this issue Feb 13, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@Irvenae
Copy link

Irvenae commented Feb 13, 2024

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?

@lerenn
Copy link
Owner

lerenn commented Feb 14, 2024

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 :)

@Irvenae
Copy link
Author

Irvenae commented Feb 14, 2024

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.

@lerenn lerenn added the enhancement New feature or request label Feb 25, 2024
@lerenn
Copy link
Owner

lerenn commented Feb 25, 2024

I'm busy on the AsyncAPI V3 support for now, but I'll take look after that :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants