We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I can see that path automatically gets the required property, but what about other fields? Is there any required/not_nullable tag that can be used?
I tried looking through the documentation but I don't really see anything that can help me with this.
The text was updated successfully, but these errors were encountered:
I've tried using the validate tag but it seems to do nothing for some reason
Sorry, something went wrong.
openapi-go uses github.com/swaggest/jsonschema-go to reflect JSON schema, please check https://github.com/swaggest/jsonschema-go#field-tags for more details on supported field tags.
openapi-go
github.com/swaggest/jsonschema-go
In your case you need to add required:"true" to the required field.
required:"true"
type MyStruct struct { Foo int `json:"foo" required:"true"` }
Yep that fixes my problems! Was looking at the wrong jsonschema go project!
No branches or pull requests
I can see that path automatically gets the required property, but what about other fields? Is there any required/not_nullable tag that can be used?
I tried looking through the documentation but I don't really see anything that can help me with this.
The text was updated successfully, but these errors were encountered: