[issue] - same operationId won't generate outputs
See original GitHub issueWhat are the steps to reproduce this issue?
- create an input target that has operations with the same id
- run your generate normally
ie.:
- add this code below into the
samples/react-app-with-react-query/petstore.yaml
/dogs:
get:
summary: List all dogs
operationId: listPets 👈 it will cause the issue
tags:
- dogs
parameters:
- name: limit
in: query
description: How many items to return at one time (max 100)
required: false
schema:
type: string
responses:
'200':
description: A paged array of pets
headers:
x-next:
description: A link to the next page of responses
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/Pets'
default:
description: unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
- run orval
- you won’t see
dogs
outputs
What happens?
Just noticed it, cause I have a huge swagger.json
file that has many similar operationId
. ie.: getAll
, getById
, …
When the input target has operations with the same operationId
being repeated many times, the output won’t have all operations.
What were you expecting to happen?
Generate all operations, even those with the same Id.
Any logs, error output, etc?
…
Any other comments?
sent the pr: https://github.com/anymaniax/orval/pull/157
Which worked fine for me. But, noticed that it won’t work for the modes single
and split
. Any thoughts?
What versions are you using?
Operating System: macOS Big Sur 11.2.3 Package Version: 5.4.4 Browser Version: Google Chrome 91.0.4472.77
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Duplicate operationId values · Issue #361 - GitHub
Currently the operationId for the OpenAPI spec is generated only from the simple method name (if not explicitly set).
Read more >Cannot have multiple operations with the same operationId
I have imported an API from swagger-UI and able to create an api and product,But when I am ...
Read more >Fix Swagger Validator errors in Power Platform connectors
Your swagger has an operation with a response example, but that same operation does not produce a response with the indicated MIME type....
Read more >Path Operation Advanced Configuration - FastAPI
You can set the OpenAPI operationId to be used in your path operation with the parameter operation_id . You would have to make...
Read more >Using OpenApiReference To Generate Open API Client Code
I this post I show how you can customise the code generated by the ... this suffers the same problem of all command...
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
Sure you can check here
is it documented?
btw thanks for an answer so fast 😅