You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Openapi documents can have a lot of information about apis and types and the client isn't currently adding
a good chunk of that information tothe docstring
Leading to people needing to refer back to the openapi file instead of the library.
Describe the solution you'd like
I think we could improve this situation. We should add as much context as is relevant to the docstrings.
From there they would be visible in the IDE and visible in any generated module documentation.
It would be nice if they were well formatted and maybe cross-refrenced but that's not the point of this issue.
The point is to have as much information as possible in the docstrings (inside the IDE or generated module documentation without looking at the openapi document)
currently API and model generation only uses the description field.
It looks like the api has at least a description and summary attribute which documents may or may not use
The models have attrs which have a description and example field. I can't find a way for attrs to get per attr documentation but at the very least it could be added to the class.
Additional context
I was thinking of starting with something like
def sync(
{{ arguments(endpoint) | indent(4) }}
) -> Optional[{{ return_string }}]:
"""{% if endpoint.summary %}{{ endpoint.summary | wordwrap(73)}}
{% else %}
{{ endpoint.title | wordwrap(73)}}
{% endif %}
{{ endpoint.description | wordwrap(73)}}"""
for endpoint_module.py.jinja. Well that plus if we have query fields instead of a model also including description and example for each of them
The text was updated successfully, but these errors were encountered:
P.S. Is there a way to run the tool in place without installation or editable installation?
Trying to make changes and having to pip uninstall/re pip install every time is annoying.
--editable doesn't seem to work for pyproject.toml based packages
P.S. Is there a way to run the tool in place without installation or editable installation?
Trying to make changes and having to pip uninstall/re pip install every time is annoying.
--editable doesn't seem to work for pyproject.toml based packages
Sorry I didn't see this comment before now! I've been bombarded with GitHub notifications lately so a lot of them slip through the cracks :/. The best way is to use Poetry to manage the environment. Then if you're in a poetry shell running the command openapi-python-client will just use whatever the latest source is.
I tried to lay that out in CONTRIBUTING.md but please let me know how I can make it more clear to prospective contributors!
Is your feature request related to a problem? Please describe.
Openapi documents can have a lot of information about apis and types and the client isn't currently adding
a good chunk of that information tothe docstring
Leading to people needing to refer back to the openapi file instead of the library.
Describe the solution you'd like
I think we could improve this situation. We should add as much context as is relevant to the docstrings.
From there they would be visible in the IDE and visible in any generated module documentation.
It would be nice if they were well formatted and maybe cross-refrenced but that's not the point of this issue.
The point is to have as much information as possible in the docstrings (inside the IDE or generated module documentation without looking at the openapi document)
currently API and model generation only uses the description field.
It looks like the api has at least a description and summary attribute which documents may or may not use
The models have attrs which have a description and example field. I can't find a way for attrs to get per attr documentation but at the very least it could be added to the class.
Additional context
I was thinking of starting with something like
def sync(
{{ arguments(endpoint) | indent(4) }}
) -> Optional[{{ return_string }}]:
"""{% if endpoint.summary %}{{ endpoint.summary | wordwrap(73)}}
{% else %}
{{ endpoint.title | wordwrap(73)}}
{% endif %}
{{ endpoint.description | wordwrap(73)}}"""
for endpoint_module.py.jinja. Well that plus if we have query fields instead of a model also including description and example for each of them
The text was updated successfully, but these errors were encountered: