swagger-api / swagger-api/swagger-parser

Empty response header and definitions not getting parsed

Open
#1,031 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
867
Forks
560
Avg merge
2d 21h
Merged PRs (30d)
7

Description

Empty response headers and definitions not getting parsed by parser V2
Example:
definitions:
ErrorResponse: [] ---- not getting parsed (should be of type object)
.
.
.
400:
description: Bad request, invalid or incorrectly formatted postcode.
headers: [] ---- not getting parsed (should be of type object)
examples:
application/json:
httpCode: "400"
httpMessage: Bad Request
moreInformation: Invalid UK Postcode

However, empty tags and parameters get parsed

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the supplied OpenAPI example with parser V2 and inspect the entry point that handles empty definitions and response headers. Compare this behavior with the existing handling for empty tags and parameters; done means empty definitions and headers are parsed as objects and the example is covered by a passing test.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend-api-design
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.