Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swagger: Path definition ignored silently if no 200 response defined #851

Open
barryoneill opened this issue Feb 2, 2021 · 0 comments
Open

Comments

@barryoneill
Copy link

When importing swagger definitions, if there is no 200 response defined on a path, that path's definition will be silently ignored on import.

In the example below, I have a GET endpoint that returns a 202 status. This endpoint is ignored. When I change this to (or add a) 200 response definition, the service is created.

swagger: '2.0'
info:
  title: BARRYTEST
  version: '1.0'
paths:
  /ping/{id}:
    get:
      description: a ping endpoint
      produces:
        - application/json
      parameters:
        - in: query
          name: id
          description: 'the resource to ping'
          type: string
          required: true
      responses:
        202:
          description: ping accepted
          schema:
            # must be a ref- https://github.com/apicollective/apibuilder/issues/594
            $ref: '#/definitions/PingResponse'
definitions:
  PingResponse:
    type: object
    properties:
      message:
        type: string
        description: miaow


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant