-
-
Notifications
You must be signed in to change notification settings - Fork 3
[REQ] name endpoint fns/methods using spec case operationId #32
Comments
This issue came up when writing v3.0.3 unit test spec. When one endpoint has multiple tags it was generated multiple times. A better way to do it is to generate each endpoint once then import or inherit it in tag code. |
@rm3l and @kevariste225 Your feature request was to get an endpoint by operationId though.
Then one could do this:
One could see my above PR as a similar-to and I am available if you want a meeting to talk about how to do it. |
Closing because this repo has been relocated |
Uh oh!
There was an error while loading. Please reload this page.
Is your feature request related to a problem? Please describe.
Some engineers prefer that endpoint methods/fns be named using the original operationId spec case
Can this feature be added to python-experimental?
@rm3l
Describe the solution you'd like
Using the original case is possible but awkward because operationIds can be any string, even invalid python variable names like:
So to implement this, the api classes would:
__dict__
Whichever one best works with type hints would be chosen.
To do this, api_client may have to be passed in to each endpoint call.
Pseudocode would look like:
Describe alternatives you've considered
Or we can keep the code as-is where operationId is converted to python snake case
Additional context
This was requested in: OpenAPITools/openapi-generator#5214 (comment)
Similar issue: OpenAPITools/openapi-generator#3813
Please vote for what you want!
The text was updated successfully, but these errors were encountered: