openapi-python-client
openapi-python-client copied to clipboard
Generate modern Python clients from OpenAPI
**Describe the bug** #1009 introduced an `alias=` to the generated attrs `field`s. The `alias=` support needs [attrs version 22.2 or higher](https://www.attrs.org/en/stable/changelog.html#id10). However, `openapi-python-client` emits `attrs>=21.3.0`. The generated code fails to...
I ran into an OpenAPI spec which included a `Response` type. That caused a name conflict in the generated python code: ``` from ...models.response import Response from ...types import Response...
**Describe the bug** Support for multiple content types for a single endpoint was added in #453 / #822. However, the implemented fix generates non-functional code if the content types expect...
This PR contains the following updates: | Update | Change | |---|---| | lockFileMaintenance | All locks refreshed | 🔧 This Pull Request updates lock files to use the latest...
Thank you for this great project! **Describe the bug** Ruff check of generated code is failing Generating a client from an openapi.json file results in ``` Error(s) encountered while generating,...
**Describe the bug** [Documentation](https://github.com/openapi-generators/openapi-python-client/blob/61b6c54994e2a6285bb422ee3b864c45b5d88c15/openapi_python_client/schema/3.1.0.md?plain=1#L1671) indicates that patterned HTTP status codes may be used for Response Objects. Supply a patterened HTTP status code in this manner results in the following warning:...
**Describe the bug** When a response media type has an `anyOf` schema, the generated code does not parse it properly/is not valid. (see add'l context) **OpenAPI Spec File** https://gist.github.com/nkrishnaswami/8c4a2068d8ac59cab153136a6069b44d **Desktop...
**Describe the bug** Calling from `cli` using [the suggested method](https://github.com/openapi-generators/openapi-python-client/blob/13bf2e852c8cc68fff4b8c19abc2ae42bceff319/README.md?plain=1#L48) with `python -m` does not work. ```shell python -m openapi-python-client --version PATH_TO_PYTHON\python.exe: No module named openapi-python-client ``` Using underscores, however,...
**Describe the bug** When creating the client from a schema, it fails with the following message: ``` WARNING parsing GET /v1/finding within finding. Cannot parse response for status code 200...
**Describe the bug** When an OpenAPI 3.0 schema defines a property as an array of binaries inside a multipart/form-data requestBody, the generator currently treats it as a JSON body and...