How to use/need for Validate function in model.go file ? #2845
Unanswered
BhanuKiranChaluvadi
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Problem statement
How to use
func (m *Error) Validate(formats strfmt.Registry) error
?Swagger specification
I have a error model that looked like this
Auto generate server stub
Auto generated
models/error.go
looked like thisThe function
Validate(formats strfmt.Registry)
takes in a parameter calledformats
of type strfmt.Registry. Not sure, how and where to use thisValidate
function and what to pass as an argument for formats. Any example is greatly appreciated.Environment
swagger version: 2.0
Beta Was this translation helpful? Give feedback.
All reactions