Fix python-fastapi signature of parameters for method#18691
Conversation
| null | ||
| ); | ||
| } | ||
|
|
There was a problem hiding this comment.
thanks for the PR.
cc @cbornet (2017/09) @tomplus (2018/10) @krjakbrjak (2023/02) @fa0311 (2023/10) @multani (2023/10)
|
@diorcety do you have a test that you could add to show the problem and how your change fixes it? |
|
An integrated test? no for the moment, but a json file yes, the one from grafana: https://github.com/grafana/grafana/blob/main/public/openapi3.json |
|
@diorcety can you please update the test spec |
Done. The example comes from grafana API. The issue is really related to "lazy" body definition which is solved by using the same function that client generator |
|
I've filed #19830 and limited the change only to python fastapi (as python client generators do not use the |
|
closed via #19830 thanks for the contribution |
If the parameter type is an map or a list an invalid python was producted, for example:
body: = Body(None, description=""),This PR use function postProcessOperationsWithModels of AbstracPythonCodegen in order to use
vendorExtensions.x-py-typing