Tags: shanehead/openapi-python-client
Tags
Release 0.23.1 (openapi-generators#1195) > [!IMPORTANT] > Merging this pull request will create this release ## Features - allow Ruff 0.9 (openapi-generators#1192) Co-authored-by: knope-bot[bot] <152252888+knope-bot[bot]@users.noreply.github.com>
Release 0.23.0 (openapi-generators#1181) > [!IMPORTANT] > Merging this pull request will create this release ## Breaking Changes ### Delete fewer files with `--overwrite` `--overwrite` will no longer delete the entire output directory before regenerating. Instead, it will only delete specific, known directories within that directory. Right now, that is only the generated `models` and `api` directories. Other generated files, like `README.md`, will be overwritten. Extra files and directories outside of those listed above will be left untouched, so you can any extra modules or files around while still updating `pyproject.toml` automatically. Closes openapi-generators#1105. ## Features - Support httpx 0.28 (openapi-generators#1172) ### Add `generate_all_tags` config option You can now, optionally, generate **duplicate** endpoint functions/modules using _every_ tag for an endpoint, not just the first one, by setting `generate_all_tags: true` in your configuration file. ## Fixes - Support Typer 0.14 and 0.15 (openapi-generators#1173) ### Fix minimum `attrs` version The minimum `attrs` dependency version was incorrectly set to 21.3.0. This has been corrected to 22.2.0, the minimum supported version since `openapi-python-client` 0.19.1. Closes openapi-generators#1084, thanks @astralblue! ### Fix compatibility with Pydantic 2.10+ openapi-generators#1176 by @Viicos Set `defer_build` to models that we know will fail to build, and call `model_rebuild` in the `__init__.py` file. Co-authored-by: knope-bot[bot] <152252888+knope-bot[bot]@users.noreply.github.com>
Release 0.22.0 (openapi-generators#1170) > [!IMPORTANT] > Merging this pull request will create this release ## Breaking Changes ### Drop support for Python 3.8 Python 3.8 is no longer supported. "New" 3.9 syntax, like generics on builtin collections, is used both in the generator and the generated code. ### `type` is now a reserved field name Because `type` is used in type annotations now, it is no longer a valid field name. Fields which were previously named `type` will be renamed to `type_`. ## Features - Support Ruff 0.8 (openapi-generators#1169) Co-authored-by: knope-bot[bot] <152252888+knope-bot[bot]@users.noreply.github.com>
Release 0.21.7 (openapi-generators#1151) > [!IMPORTANT] > Merging this pull request will create this release ## Fixes - allow required fields list to be specified as empty (openapi-generators#651) (openapi-generators#1149) - import cast for required const properties, since it's used in the template (openapi-generators#1153) Co-authored-by: knope-bot[bot] <152252888+knope-bot[bot]@users.noreply.github.com>
Release 0.21.6 (openapi-generators#1139) > [!IMPORTANT] > Merging this pull request will create this release ## Features - update Ruff to >=0.2,<0.8 (openapi-generators#1137) - Add UUID string format. Thanks @estyrke! (openapi-generators#1140) - Support OpenAPI 3.1 prefixItems property for arrays. Thanks @estyrke! (openapi-generators#1141) ### Add `literal_enums` config setting Instead of the default `Enum` classes for enums, you can now generate `Literal` sets wherever `enum` appears in the OpenAPI spec by setting `literal_enums: true` in your config file. ```yaml literal_enums: true ``` Thanks to @emosenkis for PR openapi-generators#1114 closes openapi-generators#587, openapi-generators#725, openapi-generators#1076, and probably many more. Thanks also to @eli-bl, @expobrain, @theorm, @chrisguillory, and anyone else who helped getting to this design! ## Fixes - Typo in docstring (openapi-generators#1128) ### Use literal value instead of `HTTPStatus` enum when checking response statuses Python 3.13 renamed some of the `HTTPStatus` enum members, which means clients generated with Python 3.13 may not work with older versions of Python. This change stops using the `HTTPStatus` enum directly when checking response statuses. Statuses will still be checked for validity at generation time, and transformed into `HTTPStatus` _after_ being checked at runtime. This may cause some linters to complain. Co-authored-by: knope-bot[bot] <152252888+knope-bot[bot]@users.noreply.github.com>
Release 0.21.5 (openapi-generators#1115) > [!IMPORTANT] > Merging this pull request will create this release ## Features ### Improved property-merging behavior with `allOf` When using `allOf` to extend a base object type, `openapi-python-client` is now able to handle some kinds of modifications to an existing property that would have previously caused an error: - Overriding attributes that do not affect validation, such as `description`. - Combining properties that this generator ignores, like `maxLength` or `pattern`. - Combining a generic numeric type with `int` (resulting in `int`). - Adding a `format` to a string. - Combining `any` with a specific type (resulting in that specific type). - Adding or overriding a `default` > [!NOTE] > `pattern` and `max_length` are no longer fields on `StringProperty`, which may impact custom templates. This also fixes a bug where properties of inline objects (as opposed to references) were not using the merge logic, but were simply overwriting previous definitions of the same property. ## Fixes - Allow default values for properties of `Any` type ### Produce valid code for an object that has no properties at all Fixed by PR openapi-generators#1109. Thanks @eli-bl! Co-authored-by: knope-bot[bot] <152252888+knope-bot[bot]@users.noreply.github.com>
Release 0.21.4 (openapi-generators#1106) > [!IMPORTANT] > Merging this pull request will create this release ## Fixes ### Allow OpenAPI 3.1-style `exclusiveMinimum` and `exclusiveMaximum` Fixed by PR openapi-generators#1092. Thanks @mikkelam! ### Add missing `cast` import when using `const` Fixed by PR openapi-generators#1072. Thanks @dorcohe! ### Correctly resolve references to a type that is itself just a single allOf reference PR openapi-generators#1103 fixed issue openapi-generators#1091. Thanks @eli-bl! ### Support `const` booleans and floats Fixed in PR openapi-generators#1086. Thanks @flxdot! Co-authored-by: knope-bot[bot] <152252888+knope-bot[bot]@users.noreply.github.com>
Release 0.21.3 (openapi-generators#1100) > [!IMPORTANT] > Merging this pull request will create this release ## Features - update Ruff to >=0.2,<0.7 (openapi-generators#1097) Co-authored-by: knope-bot[bot] <152252888+knope-bot[bot]@users.noreply.github.com>
chore: prepare release 0.21.2 (openapi-generators#1079) This PR was created by Knope. Merging it will create a new release ### Features - Update to Ruff 0.5 Co-authored-by: GitHub <[email protected]>
chore: prepare release 0.21.1 (openapi-generators#1056) This PR was created by Knope. Merging it will create a new release ### Features #### Support request body refs You can now define and reuse bodies via refs, with a document like this: ```yaml paths: /something: post: requestBody: "$ref": "#/components/requestBodies/SharedBody" components: requestBodies: SharedBody: content: application/json: schema: type: string ``` Thanks to @kigawas and @supermihi for initial implementations and @RockyMM for the initial request. Closes openapi-generators#633, closes openapi-generators#664, resolves openapi-generators#595. ### Fixes - Indent of generated code for non-required lists. Thanks @sfowl! (openapi-generators#1050) - Parsing requestBody with $ref (openapi-generators#633) Co-authored-by: GitHub <[email protected]>
PreviousNext