-
-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Codegen parameter for query json serialization #21718
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
Codegen parameter for query json serialization #21718
Conversation
f77fff4
to
4c9560e
Compare
There were issues with One issue remains with Edit: I believe I might have resolved the issue in this PR. |
bb8292c
to
42baf73
Compare
The Python tests looks to be flaky? They have worked previously but now when I rerun them (closing and reopening the PR) there are a random subset that fail each time |
fyi. looks like it's working in master: #21723 just restarted the failed job (i saw connection issues, retry max out) and all green now |
cc @OpenAPITools/generator-core-team |
* Add endpoints with query parameters that require Json-serialization * Add property for query json-serialization * Update samples * Adjust indentation for specification
I am interested in implementing so that the Spring http clients can support Json serialization for query parameters.
Since this effort might take a while, especially to get right, I would find it beneficial if the project exposed a codegenParameter which could be used to handle this with a local template-modification until a finished implementation is available in the project.
This PR adds this, in the form of a codegenParameter
queryIsJsonMimeType
. It can be used as{{#queryIsJsonMimeType}}
as a complement to{{#isExplode}}
in theapi.mustache
file to adjust how an object is serialized.I have also added an endpoint to a sample specification that use query parameters with json serialization, so that it can be seen later how they are affected when a serialization implementation is in place.
PR checklist
Commit all changed files.
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*
.IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
master
(upcoming7.x.0
minor release - breaking changes with fallbacks),8.0.x
(breaking changes without fallbacks)"fixes #123"
present in the PR description)