Skip to content

Conversation

@TommoLeedsy
Copy link
Contributor

@TommoLeedsy TommoLeedsy commented Jan 30, 2024

This PR adds support for struct validation, It pulls the information for the Go Validator V10 tags and converts into OpenAPI schemas.

For reference, natively gin uses the binding tag name as opposed to validate (which is the go validator default)

Copy link
Contributor

@Will-Mann-16 Will-Mann-16 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple things to change that I can see - especially about expected behaviours

@Will-Mann-16
Copy link
Contributor

Can we also add some form of documentation showcasing this behaviour?

@TommoLeedsy
Copy link
Contributor Author

I did add a new example what else do you want me to add to showcase the feature?

@Will-Mann-16
Copy link
Contributor

I did add a new example what else do you want me to add to showcase the feature?

On the readme or a new file in the docs showcasing this feature, this seems like one of our major selling points (maybe add to the bullet points at the top of the readme?)

@Will-Mann-16
Copy link
Contributor

Think I'm not following this PRs purpose, is it just binding: required functionality or the whole validate suite? Is it all correctly passing to the schema?

@TommoLeedsy
Copy link
Contributor Author

Its the whole validate suite thanks too validjsonator

@Will-Mann-16
Copy link
Contributor

Also something I thought of, can we get an integration test demonstrating this behaviour

@TommoLeedsy
Copy link
Contributor Author

I have now updated the README to include this feature. I will also add some integration test.

@TommoLeedsy
Copy link
Contributor Author

I will merge main when #73 is merged in.

@TommoLeedsy
Copy link
Contributor Author

@Will-Mann-16 I think this is now ready for a re-review!

@TommoLeedsy
Copy link
Contributor Author

TommoLeedsy commented May 21, 2024

@Will-Mann-16 main has now been merged and all of the tests are passing. Ideally LS6-Events/validjsonator#4 would get merged in before this went in but its not a massive issue if it doesn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants