1 year ago

#380382

test-img

anurjalal

How to add Location Header in response body on go-restful plugin

I cannot add documentation on response header and generate this schema by using go-restful :

I want response body on schema to be like this:

"responses": {
  "302": {
    "description": "Found. Redirected to login page with either request_id or error.",
    "headers": {
      "Location": {
        "description": "The Location header",
        "type": "string"
      }
    }
  }
}

I've tried all the API and cannot get the expected result. for generating client code with go-swagger

swagger

openapi

swagger-2.0

openapi-generator

go-restful

0 Answers

Your Answer

Accepted video resources