Skip to content

Releases: openapi-generators/openapi-python-client

0.7.3 - 2020-12-21

21 Dec 22:00

Choose a tag to compare

Fixes

  • Spacing and extra returns for Union types of additionalProperties (#266 & #268). Thanks @joshzana & @packyg!
  • Title of inline schemas will no longer be missing characters (#271 & #274). Thanks @kalzoo!
  • Handling of nulls (Nones) when parsing or constructing dates (#267). Thanks @fyhertz!

0.7.2 - 2020-12-08

09 Dec 00:37

Choose a tag to compare

Fixes

  • A bug in handling optional properties that are themselves models (introduced in 0.7.1) (#262). Thanks @packyg!

0.7.1 - 2020-12-08

08 Dec 23:08

Choose a tag to compare

Additions

  • Support for additionalProperties attribute in OpenAPI schemas and "free-form" objects by adding an additional_properties attribute to generated models. COMPATIBILITY NOTE: this will prevent any model property with a name that would be coerced to "additional_properties" in the generated client from generating properly (#218 & #252). Thanks @packyg!

Fixes

  • Enums will once again work with query parameters (#259). Thanks @packyg!
  • Generated Poetry metadata in pyproject.toml will properly indicate Python 3.6 compatibility (#258). Thanks @bowenwr!

0.7.0 - 2020-11-25

25 Nov 15:01
c8fa981

Choose a tag to compare

Breaking Changes

  • Any request/response field that is not required and wasn't specified is now set to UNSET instead of None.
  • Values that are UNSET will not be sent along in API calls
  • Schemas defined with type=object will now be converted into classes, just like if they were created as ref components.
    The previous behavior was a combination of skipping and using generic Dicts for these schemas.
  • Response schema handling was unified with input schema handling, meaning that responses will behave differently than before.
    Specifically, instead of the content-type deciding what the generated Python type is, the schema itself will.
    • As a result of this, endpoints that used to return bytes when content-type was application/octet-stream will now return a File object if the type of the data is "binary", just like if you were submitting that type instead of receiving it.
  • Instead of skipping input properties with no type, enum, anyOf, or oneOf declared, the property will be declared as None.
  • Class (models and Enums) names will now contain the name of their parent element (if any). For example, a property
    declared in an endpoint will be named like {endpoint_name}_{previous_class_name}. Classes will no longer be
    deduplicated by appending a number to the end of the generated name, so if two names conflict with this new naming
    scheme, there will be an error instead.

Additions

  • Added a --custom-template-path option for providing custom jinja2 templates (#231 - Thanks @erichulburd!).
  • Better compatibility for "required" (whether or not the field must be included) and "nullable" (whether or not the field can be null) (#205 & #208). Thanks @bowenwr & @emannguitar!
  • Support for all the same schemas in responses as are supported in parameters.
  • In template macros: added declare_type param to transform and initial_value param to construct to improve flexibility (#241 - Thanks @packyg!).

Fixes

  • Fixed spacing and generation of properties of type Union in generated models (#241 - Thanks @packyg!).
  • Fixed usage instructions in generated README.md (#247 - Thanks @theFong!).

0.7.0-rc.3 - 2020-11-24

24 Nov 18:06

Choose a tag to compare

Pre-release

Fixes

0.7.0-rc.2

18 Nov 22:16
fb4787e

Choose a tag to compare

0.7.0-rc.2 Pre-release
Pre-release

Additions

  • In template macros: added declare_type param to transform and initial_value param to construct to improve flexibility (#241 - Thanks @packyg!).

Fixes

  • Fixed spacing and generation of properties of type Union in generated models (#241 - Thanks @packyg!).

0.7.0-rc.1 - 2020-11-11

11 Nov 20:51
c858ee9

Choose a tag to compare

Pre-release

Fixed issue with non-required fields in a model not being marked as such

0.7.0-rc.0 - 2020-11-10

10 Nov 15:46
1a0dc6d

Choose a tag to compare

Pre-release

Breaking Changes

  • Any request/response field that is not required and wasn't specified is now set to UNSET instead of None.
  • Values that are UNSET will not be sent along in API calls
  • Schemas defined with type=object will now be converted into classes, just like if they were created as ref components.
    The previous behavior was a combination of skipping and using generic Dicts for these schemas.
  • Response schema handling was unified with input schema handling, meaning that responses will behave differently than before.
    Specifically, instead of the content-type deciding what the generated Python type is, the schema itself will.
    • As a result of this, endpoints that used to return bytes when content-type was application/octet-stream will now return a File object if the type of the data is "binary", just like if you were submitting that type instead of receiving it.
  • Instead of skipping input properties with no type, enum, anyOf, or oneOf declared, the property will be declared as None.
  • Class (models and Enums) names will now contain the name of their parent element (if any). For example, a property
    declared in an endpoint will be named like {endpoint_name}_{previous_class_name}. Classes will no longer be
    deduplicated by appending a number to the end of the generated name, so if two names conflict with this new naming
    scheme, there will be an error instead.

Additions

  • Added a --custom-template-path option for providing custom jinja2 templates (#231 - Thanks @erichulburd!).
  • Better compatibility for "required" (whether or not the field must be included) and "nullable" (whether or not the field can be null) (#205 & #208). Thanks @bowenwr & @emannguitar!
  • Support for all the same schemas in responses as are supported in parameters.

0.6.2 - 2020-11-03

03 Nov 16:36

Choose a tag to compare

Fixes

  • Prefix generated identifiers to allow leading digits in field names (#206 - @kalzoo).
  • Prevent autoflake from removing __init__.py imports during generation. (#223 - Thanks @fyhertz!)
  • Update minimum Pydantic version to support Python 3.9

Additions

  • Allow specifying the generated client's version using package_version_override in a config file. (#225 - Thanks @fyhertz!)

0.6.1 - 2020-09-26

26 Sep 15:23

Choose a tag to compare

Changes

  • Use httpx ^0.15.0 in generated clients

Fixes

  • Properly remove spaces from generated Enum keys (#198). Thanks @bowenwr!

Additions

  • Endpoints without operationIds will have a name generated from their method and path (#92). Thanks @Kerybas & @dtkav!
  • autoflake will be run on generated clients to clean up unused imports / variables (#138). Thanks @pawamoy!
  • Note to README about supported OpenAPI versions (#176). Thanks @filippog!