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
This amply slows down generation.
On my machine, the SmokeTest test takes about 12 seconds before the change and times out after (60 seconds)
I also found this commit bd9d325 which changes the resolution mode from RESOLVE_MODE_ALL to RESOLVE_MODE_INLINE without explaining why but surely on purpose.
My second thought was to resolve references in the mapPrams method by overriding context at that time to change its mode:
But according to the OpenAPI specification, references can be used at various locations, for example responses.
I know responses are not yet parsed, but I think it should be taken in account for the future.
As I think there are choices to make, I preferred to submit an issue first. I'll submit a PR when this discussion converges to a solution.
The text was updated successfully, but these errors were encountered:
Issue
When the OpenAPI schema contains referenced parameters, they are not resolved and not included in the generated SDK.
Here is a test that fails to reproduce this (based on https://github.com/crescat-io/saloon-sdk-generator/blob/master/tests/Samples/spotify.yml) :
For reference, here is the expected SDK (based on the source schema):
Resolution & discussion
At the first attempt, I tried:
https://github.com/crescat-io/saloon-sdk-generator/blob/master/src/Parsers/OpenApiParser.php
This amply slows down generation.
On my machine, the
SmokeTest
test takes about 12 seconds before the change and times out after (60 seconds)I also found this commit bd9d325 which changes the resolution mode from
RESOLVE_MODE_ALL
toRESOLVE_MODE_INLINE
without explaining why but surely on purpose.My second thought was to resolve references in the
mapPrams
method by overriding context at that time to change itsmode
:But according to the OpenAPI specification, references can be used at various locations, for example responses.
I know responses are not yet parsed, but I think it should be taken in account for the future.
As I think there are choices to make, I preferred to submit an issue first. I'll submit a PR when this discussion converges to a solution.
The text was updated successfully, but these errors were encountered: