I solved this by switching to goswagger.io which had easier to handle syntax. These are the models used for the basic jsend types. For other responses I replaced the Data element with the name of the relevent struct and swagger did the rest.
// Success: no response data required
// swagger:response responseSuccess
type responseSuccess struct {
// in: body
Body struct {
// enum: success
Status string `json:"status"`
Data interface{} `json:"data"`
} `json:"body"`
}
// Error: Incorrect use of the API or the requested data is not available
// swagger:response responseError
type responseError struct {
// in: body
Body struct {
// enum: error
Status string `json:"status"`
Data interface{} `json:"data"`
Message string `json:"message"`
} `json:"body"`
}
// Fail: Backend or system failure.
// swagger:response responseFail
type responseFail struct {
// in: body
Body struct {
// enum: fail
Status string `json:"status"`
Data interface{} `json:"data"`
Message string `json:"message"`
} `json:"body"`
}