Skip to content

fix: #457 Parameters from PathItem can now be overriden in Operation #458

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

Merged
merged 60 commits into from
Aug 15, 2021
Merged
Changes from 1 commit
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
8994ec3
Fix: `PathItem` parameters overriding in `Operation`
mtovts Jul 22, 2021
dfc9e5a
Update `templates\endpoint_*` to correct work with parameters
mtovts Jul 22, 2021
1776c89
Update template to correct work with `json_body`
mtovts Jul 22, 2021
abe5144
Update template\endpoint_macros.jinja` to correct work with headers
mtovts Jul 22, 2021
7468e4c
Refactor: Parameters update
mtovts Jul 23, 2021
b1e87e5
Add duplicates parameters check
mtovts Jul 23, 2021
2139e38
code style
mtovts Jul 25, 2021
60cb64f
Refactor: use `str` instead `PythonIdentifier` in parameters dictiona…
mtovts Jul 25, 2021
cc55220
Fix: update unit-tests related with `Endpoint._add_parameters()`
mtovts Jul 25, 2021
2247a9a
Add: `common_parameters_overriding` endpoint to e2e tests
mtovts Jul 25, 2021
86a9f53
Add parameters locations: `header`, `cookie` in `same-name-multiple-l…
mtovts Jul 25, 2021
7e34088
Add generated `common_parameters_overriding` edpoints to e2e tests
mtovts Jul 25, 2021
32e94a1
Update `same_name_multiple_locations_param` generated endpoint in e2e…
mtovts Jul 25, 2021
a4f6458
Update generated endpoints in `common_parameters`: add location postfix
mtovts Jul 25, 2021
38f341b
Update `end_to_end_tests\golden-record\*`
mtovts Jul 26, 2021
3292a38
Update `\test_custom_templates\*_init.py.jinja`
mtovts Jul 26, 2021
84a440a
Update `test__add_parameters_happy`
mtovts Jul 27, 2021
c6bfea2
naming
mtovts Jul 27, 2021
6378616
Delete .PR_note.md
mtovts Jul 27, 2021
4080f89
return: Set parameter identifier `{param.name} _ {param.param_in}` on…
mtovts Jul 30, 2021
237ebb3
Update test related with python identifiers for parameters
mtovts Jul 30, 2021
bbb4928
Revert "Update generated endpoints in `common_parameters`: add locati…
mtovts Jul 30, 2021
d59c555
Revert "Update `end_to_end_tests\golden-record\*`"
mtovts Jul 30, 2021
5f171b3
Return relative imports in e2e tests
mtovts Jul 30, 2021
7990d9a
Return: `"json_" + endpoint.json_body.python_name`
mtovts Jul 30, 2021
2b089a4
fix property `python_name` in parameter overriding
mtovts Jul 31, 2021
8d2344c
remove unused
mtovts Jul 31, 2021
ffdacfd
Merge branch 'main' into fix/overriding-parameters
mtovts Aug 5, 2021
cf9566c
Merge branch 'main' into fix/overriding-parameters
mtovts Aug 7, 2021
cea8189
Update openapi_python_client/templates/endpoint_macros.py.jinja
mtovts Aug 7, 2021
a0db741
Update openapi_python_client/templates/endpoint_macros.py.jinja
mtovts Aug 7, 2021
c465bf3
Update openapi_python_client/templates/endpoint_macros.py.jinja
mtovts Aug 7, 2021
94998d1
Update openapi_python_client/templates/endpoint_macros.py.jinja
mtovts Aug 7, 2021
7b82b4f
Update openapi_python_client/templates/endpoint_module.py.jinja
mtovts Aug 7, 2021
db34f5f
Fix `test_validation_error_when_location_not_supported`
mtovts Aug 7, 2021
4e4ebba
Update openapi_python_client/templates/endpoint_macros.py.jinja
mtovts Aug 7, 2021
55ab74f
Update openapi_python_client/templates/endpoint_macros.py.jinja
mtovts Aug 7, 2021
6029c93
Update openapi_python_client/templates/endpoint_macros.py.jinja
mtovts Aug 7, 2021
9dacd14
Update openapi_python_client/templates/endpoint_macros.py.jinja
mtovts Aug 7, 2021
bc51af2
Update openapi_python_client/templates/endpoint_macros.py.jinja
mtovts Aug 7, 2021
fb4fcf2
Update openapi_python_client/templates/endpoint_macros.py.jinja
mtovts Aug 7, 2021
200bd84
Update openapi_python_client/templates/endpoint_macros.py.jinja
mtovts Aug 7, 2021
035c491
Update openapi_python_client/templates/endpoint_macros.py.jinja
mtovts Aug 7, 2021
d8c7cb3
Update openapi_python_client/templates/endpoint_macros.py.jinja
mtovts Aug 7, 2021
3e7fe11
Fix `end_to_end_tests\openapi.json`
mtovts Aug 9, 2021
b4cfa2e
Add `/same_identifier_conflict/{param}/{param_path}` to `end_to_end_t…
mtovts Aug 9, 2021
08b5491
Lint `tests\test_parser\test_openapi.py`
mtovts Aug 9, 2021
578ddf2
Add `test__add_parameters_with_location_postfix_conflict`
mtovts Aug 9, 2021
0c82680
Add `used_python_identifiers` usage
mtovts Aug 9, 2021
43774dd
Lint the code
mtovts Aug 9, 2021
d4a5cfd
Error message
mtovts Aug 14, 2021
87debe1
Refactor: skip `PathItem` parameter if `Operation` parameter exists
mtovts Aug 14, 2021
95b4fa4
Refactor: simplify logic
mtovts Aug 14, 2021
39ab056
Fix spaces
mtovts Aug 14, 2021
28b824b
Fix tests
mtovts Aug 14, 2021
d78d4b0
make line-length < 120
mtovts Aug 14, 2021
a973637
add test for existing parameter has a conflicting PythonIdentifier af…
mtovts Aug 15, 2021
a471025
Refactor test for PythonIdentifier of new parameter already used
mtovts Aug 15, 2021
294ceb1
Merge branch 'main' into fix/overriding-parameters
mtovts Aug 15, 2021
ca7c30f
refactor: Remove unneeded check
dbanty Aug 15, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Return: "json_" + endpoint.json_body.python_name
  • Loading branch information
mtovts committed Jul 30, 2021
commit 7990d9a3d35e726644c53ee545e232fd89eca8c4
2 changes: 1 addition & 1 deletion openapi_python_client/templates/endpoint_module.py.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def _get_kwargs(
{% elif endpoint.multipart_body %}
"files": {{ "multipart_" + endpoint.multipart_body.python_name }},
{% elif endpoint.json_body %}
"json": {{ endpoint.json_body.python_name }},
"json": {{ "json_" + endpoint.json_body.python_name }},
{% endif %}
{% if endpoint.query_parameters %}
"params": params,
Expand Down