While parsing TestCase.yaml, swagger-parser produces a duplicate schema, TestCase_Foo_1. The path of logic that introduces the duplicate schema begins at ExternalRefProcessor.java:60, where the comparison fails because newSchema.properties.get("FooTypes").items.$ref is "./TestCase.yaml#/components/schemas/TestCase_FooType", while in existingModel it's "#/components/schemas/TestCase_FooType". I'm hoping to either bring this issue to light so that the maintainers can implement a fix, or suggest a fix that I can implement and submit a pull request for. I'm open to either!
This behavior is present at the HEAD of master (currently 2.0.17-SNAPSHOT, #08a76302e250), and as far back as 2.0.11. Unfortunately, I can't test with releases pre-2.0.11.
Consider the following schemas:
TestCase.yaml:
TestCase.v1.yaml:
While parsing TestCase.yaml,
swagger-parser
produces a duplicate schema,TestCase_Foo_1
. The path of logic that introduces the duplicate schema begins at ExternalRefProcessor.java:60, where the comparison fails becausenewSchema.properties.get("FooTypes").items.$ref
is"./TestCase.yaml#/components/schemas/TestCase_FooType"
, while inexistingModel
it's"#/components/schemas/TestCase_FooType"
. I'm hoping to either bring this issue to light so that the maintainers can implement a fix, or suggest a fix that I can implement and submit a pull request for. I'm open to either!This behavior is present at the HEAD of master (currently 2.0.17-SNAPSHOT, #08a76302e250), and as far back as 2.0.11. Unfortunately, I can't test with releases pre-2.0.11.