PhoenixSwagger.Path.response

You're seeing just the function response, go back to PhoenixSwagger.Path module for more information.
Link to this function

response(path, status, description)

View Source

Adds a response to the operation of a swagger %PathObject{}, without a schema.

Link to this function

response(path, status, description, schema, opts \\ [])

View Source

Adds a response to the operation of a swagger %PathObject{}, with a schema.

Optional keyword args can be provided for headers and examples.

If the mime-type is known from the produces list, then a single can be given as a shorthand.

Examples

get "/users/{id}"
produces "application/json"
parameter :id, :path, :integer, "user id", required: true
response 200, "Success", :User, examples: %{"application/json": %{id: 1, name: "Joe"}}

get "/users/{id}"
produces "application/json"
parameter :id, :path, :integer, "user id", required: true
response 200, "Success", :User, example: %{id: 1, name: "Joe"}