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 definitions missing error codes/schemas under responses #506

Open
clintyoshimura opened this issue Jun 7, 2021 · 0 comments
Open
Labels
good first issue Good for newcomers

Comments

@clintyoshimura
Copy link

The swagger definitions don't seem to have error codes/schema definitions. For example, PacketAnalyzers POST doesn't include the 400 error in the list of responses:

post:
  tags:
  - PacketAnalyzers
  summary: Create a packet analyzer
  description: Create a new packet analyzer.
  operationId: CreatePacketAnalyzer
  parameters:
  - in: body
    name: analyzer
    description: New packet analyzer
    required: true
    schema:
      $ref: '#/definitions/PacketAnalyzer'
  responses:
    "201":
      description: Created
      headers:
        Location:
          type: string
          description: URI of created analyzer
      schema:
        $ref: '#/definitions/PacketAnalyzer'

When using the go-swagger generated API this results in the API reporting it received an unsupported/unexpected response when an error occurs.

@DerangedMonkeyNinja DerangedMonkeyNinja added the good first issue Good for newcomers label Jun 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants