google / gnostic-go-generator

A gnostic plugin that generates Go clients and servers for REST APIs
Apache License 2.0
49 stars 19 forks source link

Body for non-200 responses get lost #34

Open bvwells opened 4 years ago

bvwells commented 4 years ago

Many APIs return a payload in the case of a non-200 response. For example, an error payload with details of why an API call was a bad request. i.e.

        '400':
          description: Bad request
          schema:
            $ref: "#/definitions/error"

It would be useful to have these payloads returned from the generated clients.