0.17.2 (2024-01-15)
Features
Add --meta=pdm
option for generating PEP621 + PDM metadata
The default metadata is still --meta=poetry
, which generates a pyproject.toml
file with Poetry-specific metadata.
This change adds the --meta=pdm
option which includes PDM-specific metadata, but also
standard PEP621
metadata. This may be useful as a starting point for other dependency managers & build tools (like Hatch).
Add original OpenAPI data
attribute to Response
object
PR #767
In custom templates, you can now access a response.data
attribute that contains the original OpenAPI definition of the
response (Response Object or Reference Object).
Include the UP
rule for generated Ruff config
This enables pyupgrade-like improvements which should replace some
.format()
calls with f-strings.
Fixes
Fix Ruff formatting for --meta=none
PR #940 fixes issue #939. Thanks @satwell!
Due to the lack of pyproject.toml
, Ruff was not getting configured properly when --meta=none
.
As a result, it didn't clean up common generation issues like duplicate imports, which would then cause errors from
linters.
This is now fixed by changing the default post_hook
to ruff check . --fix --extend-select=I
when --meta=none
.
Using generate --meta=none
should now be almost identical to the code generated by update
.