8000 Operation specific "produces" not overriding global "produces" · Issue #304 · go-swagger/go-swagger · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Operation specific "produces" not overriding global "produces" #304
Closed
@sflxn

Description

@sflxn

I'm building a docker api server with the docker spec in the go-swagger repo with some changes. The global "produces" look like this,

"produces": [
"application/json",
"text/plain"
],

The operation /_ping was modified to look like this,

"/_ping": {
  "get": {
    "summary": "Ping the docker server",
    "description": "Ping the docker server",
    "operationId": "ping",
    "produces": [
      "text/plain"
    ],

When I curl the server with a /_ping operation, it does not send over content-type in the header and sends over accept: /. What I expect the server to return is a plain text response. Instead it attempts to send over a json response.

It appears the operation specific "produces" is not overriding the global "produces".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0