-
-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Common Parameters for Various Paths Different API paths not resolved correctly #533
Comments
duplicate for #510 |
Some debug information so far: ln#1053 on simple_schema_test the iteration "support components property in OpenAPI v3" gives me the following feedback. The function addParameterSchema
But after that for Paths.GetGeography.Parameters i do see "incorrect" output (index number instead of name): |
@maapteh Thank you for your bug report 👍 This seems to be the same problem as #510. In the future, we plan to make it possible to replace the type generator with different implementations for each version of JSON Schema and each version of OpenAPI, but we have been very busy and have not been able to make progress on this. At this time, I think it would work better if you use $ref at |
With common parameters setup i do not have the queryParams anymore per endpoint.
So queryParameters are gone in total. I have not an option anymore. Will look further in what to do, what you advised me to do but i guess the retrieval of endpoints can not be done anymore since api's decided to have common parameters :) Btw still a great library, lots of people learned about your generator when i got some feedback on my article about it! |
Thanks for using dtsgenerator. For this new comment, I would appreciate a detailed investigation if you would write down the actual input, the actual result, and the expected result. |
Just wanted to let know that this issue is still relevant, and the fix would save the day for way more than one project. |
We moved to https://orval.dev/overview which besides creating all types (following api spec) also creates the complete hooks for integration for the frontend. Maybe you can have a look as well @kostia1st |
Good day @horiuchi at the moment im stuck when the dtsgenerator resolves common path parameters using v3.13.2 and also v3.15.0 (latest).
So when in open-api spec the endpoint says:
The generator will endup with:
While i expected the name of the referenced item as a key, so i would expect:
Do you perhaps know what can be the rootcause? Because also in your test i noticed it is not resolving the name:
https://github.com/horiuchi/dtsgenerator/blob/master/test/simple_schema_test.ts#L1040-L1043
Background
Common Parameters for Various Paths. Different API paths may have common parameters, such as pagination parameters. You can define common parameters under parameters in the global components section and reference them elsewhere via $ref. https://swagger.io/docs/specification/describing-parameters/
The text was updated successfully, but these errors were encountered: