Duplicated schemas in parsed result
See original GitHub issueRelated issue: https://github.com/OpenAPITools/openapi-generator/issues/2701
Specs that reproduces the issue
- openapi.yaml
openapi: 3.0.0
info:
title: Common Data Types
version: "1.0"
paths:
/subscriptions:
get:
summary: read all of the active subscriptions for the app.
operationId: getSubscriptionsById
parameters:
- name: appId
in: path
description: App ID
required: true
schema:
type: integer
format: int64
responses:
'200':
description: OK (Successful)
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Subscription'
'500':
$ref: './common.yaml#/components/responses/E500'
components:
schemas:
ProblemDetails:
type: object
properties:
title:
type: string
description: A short, human-readable summary of the problem
status:
type: integer
description: The HTTP status code for this occurrence of the problem.
Subscription:
type: string
- common.yaml
openapi: 3.0.0
info:
title: Common Data Types
version: "1.0"
paths: {}
components:
responses:
E500:
description: Server Error
content:
application/json:
schema:
$ref: './openapi.yaml#/components/schemas/ProblemDetails'
Test codes which shows the issue
- OpenAPIV3ParserTest.java
@Test
public void fooBar() {
String location = "src/test/resources/xxx/openapi.yaml";
OpenAPIV3Parser parser = new OpenAPIV3Parser();
OpenAPI result = parser.read(location);
}
The result
has a duplicated schema ProblemDetails_2
.
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (7 by maintainers)
Top Results From Across the Web
Myth Busting: Will Duplicate Schema Tags Hurt Your SEO?
Schema can result in warnings and errors, and one of the most common errors is having duplicate tags. Let's discuss whether or not...
Read more >JSON-LD Frame: Forcing duplication of redundant properties ...
Is it possible to force the duplication of redundant properties values, such as author and creator ? The goal is to reduce later...
Read more >Copying schemas - IBM
Use the db2move utility with the -co COPY action to copy a single schema or multiple schemas from a source database to a...
Read more >pandas.DataFrame.to_json — pandas 1.5.2 documentation
orient='table' contains a 'pandas_version' field under 'schema'. ... result = df.to_json(orient="split") >>> parsed = json.loads(result) ...
Read more >Duplicate property names in JSON objects in Power Automate
To make this object maker-friendly, the common approach is to use Parse JSON action and derive schema from the data itself.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I tested the two examples from @ackintosh and @jphorx and they work. Please close the issue.
yes that is true!, we solve the duplication issue, thanks for pointing this here! @ackintosh please test and in case the issue is no longer happening please close. fixed by #1343