I use go-swagger
. I have model like:
// Pet pet
// swagger:model
type Pet struct {
// id
ID int64 `json:"id,omitempty"`
// name
// Required: true
Name *string `json:"name"`
}
and for example in my POST field Name
have to be required but for GET not. So how should I add it if I don't want create similar model without required? Because for now my only thought is to create type PetGET struct
and type PetPOST struct
which, I guess is stupid idea.