You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's say there is a path specification in which a reference is used for the schema and another for the example:
get:
operationId: getPeerssummary: List of peerstags:
- Commsdescription: >- Retrieves the list peers in the server with details about their positions and islands.responses:
'200':
description: List of Peerscontent:
application/json; charset=utf-8:
schema:
$ref: ../../components/schemas/comms/peers.yamlexamples:
ok:
$ref: ../../components/examples/comms/peers-ok.json
What happens?
The generated code contains two extra types:
exporttypeOk=PeersOkexporttypeSchema=Peers
What were you expecting to happen?
These two extra types should not be generated.
Any other comments?
This PR contains my attempt to fix the solution, but I'm not quite sure to understand the implications of this change, so although it works for my use case it may not be appropriate to apply it.
The text was updated successfully, but these errors were encountered:
Your case is because orval is trying to resolve all the schema of non openapi file and your example is handle as a schema. Check here. Probably it could be solve by adding a better condition in that function
hello @anymaniax, thanks for the answer!, yes, I was able to trace it there but I was unable to come up with a better condition, if you have a particular suggestion I can try to work out a PR. Thanks again!
The complete example is in: https://github.com/hugoArregui/orval-test
What are the steps to reproduce this issue?
Let's say there is a path specification in which a reference is used for the schema and another for the example:
What happens?
The generated code contains two extra types:
What were you expecting to happen?
These two extra types should not be generated.
Any other comments?
This PR contains my attempt to fix the solution, but I'm not quite sure to understand the implications of this change, so although it works for my use case it may not be appropriate to apply it.
The text was updated successfully, but these errors were encountered: