I have a go web application with swagger docs generation. Recently in my project was added new endpoint that uses following struct in POST & PUT requests:
Secret struct {
// Secret unique key name.
Name string `json:"name" example:"ACCESS_TOKEN"`
// type: string
// x-go-type: "string"
Value json.RawMessage `json:"value" swagger:"type:string"`
// Tags in which this secret is used.
Tags []string `json:"tags" example:"dev,prod,omitempty"`
}
when i am attempt to build swagger docs with command: swag init -md ./documentation -o ./swagger
i am getting following error:
If i am correctly understand there should be added type definition explicitly, but i don't understand how to define type correctly, all combination of commentaries does not work. This issue is related with json.RawMessage type (Value field) because if i replace this type with interface{} everything works fine.
