openapi-python-client icon indicating copy to clipboard operation
openapi-python-client copied to clipboard

Generate modern Python clients from OpenAPI

Results 211 openapi-python-client issues
Sort by recently updated
recently updated
newest added

There should be a new instance every time we use the with statement. because if not the next time you use the client you'll get "Cannot reopen a client instance,...

**Describe the bug** code generated for `date-time` fromat in models file like this for now: ```python _update_time = d.pop("updateTime", UNSET) update_time: Union[Unset, datetime.datetime] if isinstance(_update_time, Unset): update_time = UNSET else:...

**Describe the bug** After upgrading the client to 0.17.0 and testing out, I noticed that Multipart client handling seems to have broken. The code in 0.16.0 was rougly: ```py api.sync_detailed(...

**Describe the bug** In `types.py`: https://github.com/openapi-generators/openapi-python-client/blob/0399271be4eb012f83ac3023939ff48e364634e9/openapi_python_client/templates/types.py.jinja#L24 `file_name` is marked `Optional`, so it seems like the user could omit it. But if they do to a `multipart/form` endpoint, backends such as...

As described in #692 arrays of files are not handled correctly, if they are part of multipart/form-data. This is fixed in this PR by letting `to_multipart` return a `List[Tuple[str, Any]]`...

🥚breaking

As indicated in the [OpenAPI specification](https://swagger.io/specification/), specifications may specify a range of response codes. See the following excerpt: *Any [HTTP status code](https://swagger.io/specification/#http-codes) can be used as the property name, but...

Changed behavior from using the term `x_type_0` to `x_type_y` if x is a Schema that defines a `Title` property string `y`. This provides an easier interface for understanding what users...

🥚breaking

**Describe the bug** In the `_get_kwargs` generated method, the body is determined as File type (because the format in my swagger definition is `binary`), but it tries to access its...

**Describe the bug** A model with a property of type `Union[Unset, List[SomeEnum]]` **initializes correctly** when using `__init__` initialization: ```python >>> # with non-empty list >>> SomeRequestBody(my_optional_list=[SomeEnum.FOO]) SomeRequestBody(my_optional_list=[], additional_properties={}) >>> #...