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
That is correct, this tool only generates attrs classes, not @dataclass, I don't remember all of the reasons we switched, but basically attrs gives us more options. It may be that since we no longer support Python 3.6 we could switch back at some point? But I don't see much reason to at the moment.
Sorry for posting a question in a "Feature Request". I couldn't find a way to post a question here.
Questions should go in Discussions, not Issues—I'll update the "New Issue" screen to direct folks there for the future, thanks for pointing that out!
How to generate a
@dataclass
from OpenAPI YAML specification?I have an OpenAPI YAML specification file.
I ran the following command:
openapi-python-client generate --path <file_path>
The generated files don't have a @DataClass as mentioned in the documentation here: https://pypi.org/project/openapi-python-client/0.6.0a4/
I see that in a change log, the support was removed: https://github.com/openapi-generators/openapi-python-client/blob/7af73233212ccfbf5f98db68e1039c593f564a2d/CHANGELOG.md#breaking-changes-7
Is this correct? If yes, then is it true that the library will no longer be able to generate
@dataclass
using the YAML specifications?Describe the solution you'd like
Generate
@dataclass
using YAML specificationsDescribe alternatives you've considered
Write our own
@dataclass
Sorry for posting a question in a "Feature Request". I couldn't find a way to post a question here.
The text was updated successfully, but these errors were encountered: