-
Notifications
You must be signed in to change notification settings - Fork 8
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
modify query_params and path_params class names #8
Comments
Thank you for your interest in the project. I think the method using response is not very good. What do you think of this method? original_name = self._get_model_name(path[1], '', suffix=suffix) endpoint = |
@mom1 I will test tomorrow and let you know. Thanks for looking at this. |
@mom1 That almost works but need only the last part of a path like original_name = self._get_model_name(f"{pathlib.Path(path[1]).name}/", '', suffix=suffix) |
Still getting the leading underscore for endpoints with path parameters |
I think the other problem with using the path name is that you could have a GET, POST, and PUT endpoint all with the same path name but each could have different query_params. I think using the operation name is probably the best way to avoid this as they all need to be unique. |
That's right, but here I need to investigate where to get the |
Is there a way to change how the query_params and path_params class names are generated without modifying the parser?
I would like them to be named with the camelcase endpoint name plus the suffix.
Example of what I get now:
what I want:
This is how I get it now but would rather not modify the library.
Change https://github.com/mom1/apiclient-pydantic-generator/blob/master/apiclient_pydantic_generator/parser.py#L320
The text was updated successfully, but these errors were encountered: