swagger-api / swagger-api/swagger-parser

Duplicated schemas in parsed result

Open
#1,475 0 comments 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

It looks like the bug https://github.com/swagger-api/swagger-parser/issues/1081 was reintroduced starting from the version 2.0.19.
I have the issue in the newest version of io.swagger.codegen.v3:swagger-codegen-maven-plugin.

To overcome the issue I am currently using the version 2.0.18 of the parser:

 <plugin>
    <groupId>io.swagger.codegen.v3</groupId>
    <artifactId>swagger-codegen-maven-plugin</artifactId>
    <version>3.0.22</version>
    <dependencies>
        <dependency>
            <groupId>io.swagger.parser.v3</groupId>
            <artifactId>swagger-parser-v3</artifactId>
            <version>2.0.18</version>
        </dependency>
    </dependencies>
</plugin>

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

Start by reproducing the issue with the io.swagger.codegen.v3:swagger-codegen-maven-plugin and compare parser versions 2.0.18 and 2.0.19, as described in the report. Trace where the parsed result gains duplicated schemas and add a regression test showing that the affected schemas occur only once.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.