Releases: openapi-generators/openapi-python-client
Releases · openapi-generators/openapi-python-client
0.10.4 - 2021-09-05
Features
- Allow customization of post-generation steps with the
post_hooks
config option. - Allow httpx 0.19.* (#481)
Fixes
- Don't crash the generator when one of the post-generation hooks is missing [fixes #479]. Thanks @chamini2 and @karolzlot!
0.10.3 - 2021-08-16
Features
- Expose
python_identifier
andclass_name
functions to custom templates to rename with the same behavior as the parser.
Fixes
0.10.2 - 2021-08-15
Features
- Allow path parameters to be positional args [#429 & #464]. Thanks @tsotnikov!
- Include both
UNSET
andNone
static types for nullable or optional query params [#421, #380, #462]. Thanks @forest-benchling! - Allow allOf enums to be subsets of one another or their base types [#379, #423, #461]. Thanks @forest-benchling! (#461)
Fixes
0.10.1 - 2021-07-10
Fixes
- Support multipart requests with type: array [#452 & #451]. Thanks @csymeonides-mf @slamora and @dpursehouse
0.10.0 - 2021-07-05
Breaking Changes
- Normalize generated module names to allow more tags [#428 & #448]. Thanks @iamnoah & @forest-benchling!
- Improved the consistency of snake_cased identifiers which will cause some to be renamed [#413 & #432]. Thanks @ramnes!
- Allow more types in multipart payloads by defaulting to JSON for complex types [#372]. Thanks @csymeonides-mf!
Features
Fixes
- Treat empty schemas like
Any
instead ofNone
. Thanks @forest-benchling! [#417 & #445]
0.9.2 - 2021-06-13
This release is the first release from the new GitHub organization! As such, all the links in the repo have been updated to point at the new URL.
Features
- Add option to fail on warning [#427]. Thanks @forest-benchling!
Fixes
0.9.1 - 2021-05-12
Features
- Allow references to non-object, non-enum types [#371][#418][#425]. Thanks @p1-ra!
- Allow for attrs 21.x in generated clients [#412]
- Allow for using any version of Black [#416] [#411]. Thanks @christhekeele!
Fixes
- Prevent crash when providing a non-string default to a string attribute. [#414] [#415]
- Deserialization of optional nullable properties when no value is returned from the API [#420] [#381]. Thanks @forest-benchling!
0.9.0 - 2021-05-04
Breaking Changes
- Some generated names will be different, solving some inconsistencies. (closes #369) (#375) Thanks @ramnes!
- Change reference resolution to use reference path instead of class name (fixes #342) (#366)
- If a schema references exactly one other schema in
allOf
,oneOf
, oranyOf
that referenced generated model will be used directly instead of generating a copy with another name. (#361) - Attributes shadowing any builtin except
id
andtype
will now be renamed in generated clients (#360, #378, #407). Thanks @dblanchette and @forest-benchling!
Features
- Allow httpx 0.18.x in generated clients (#400)
- Add summary attribute to Endpoint for use in custom templates (#404)
- Support common parameters for paths (#376). Thanks @ramnes!
- Add allOf support for model definitions (#98) (#321)
Fixes
- Attempt to deduplicate endpoint parameters based on name and location (fixes #305) (#406)
- Names of classes without titles will no longer include ref path (fixes #397) (#405). Thanks @ramnes!
- Problems with enum defaults in allOf (#363). Thanks @csymeonides-mf
- Prevent duplicate return types in generated api functions (#365)
- Support empty strings in enums (closes #357) (#358). Thanks @ramnes!
- Allow passing data with files in multipart. (Fixes #351) (#355)
- Deserialization of unions (#332). Thanks @forest-benchling!
0.8.0 - 2021-02-19
Breaking Changes
- Generated clients will no longer pass through
None
to query parameters. Previously, any query params set toNone
would surface as empty strings (per the default behavior ofhttpx
). This is contrary to the defaults indicated by the OpenAPI 3.0.3 spec. Ommitting these parameters makes us more compliant. If you require a style ofnull
to be passed to your query parameters, please request support for the OpenAPI "style" attribute. Thank you to @forest-benchling and @bowenwr for a ton of input on this.
Additions
- New
--meta
command line option for specifying what type of metadata should be generated:poetry
is the default value, same behavior you're used to in previous versionssetup
will generate a pyproject.toml with no Poetry information, and instead create asetup.py
with the
project info.none
will not create a project folder at all, only the inner package folder (which won't be inner anymore)
- Attempt to detect and alert users if they are using an unsupported version of OpenAPI (#281).
- The media type application/vnd.api+json will now be handled just like application/json (#307). Thanks @jrversteegh!
- Support passing models into query parameters (#316). Thanks @forest-benchling!
- Add support for cookie parameters (#326).
- New
--file-encoding
command line option (#330). Sets the encoding used when writing generated files (defaults to utf-8). Thanks @dongfangtianyu!
Changes
- Lowered the minimum version of
python-dateutil
to 2.8.0 for improved compatibility (#298 & #299). Thanks @bowenwr! - The
from_dict
method on generated models is now a@classmethod
instead of@staticmethod
(#215 & #292). Thanks @forest-benchling! - Renamed all templates to end in
.jinja
, and all python-templates to end in.py.jinja
to fix confusion with the latest version of mypy. Note this will break existing custom templates until you update your template file names.
Fixes
- Endpoint tags are now sanitized during parsing to fix an issue where
My Tag
andMyTag
are seen as two different tags but are then later unified, causing errors when creating directories. Thanks @p1-ra! (#328) - Parser will softly ignore value error during schema responses' status code convertion from string to integer (not a number). Errors will be reported to the end user and parsing will continue to proceed (#327).
- The generated
from_dict
andto_dict
methods of models will now properly handlenullable
andnot required
properties that are themselves generated models (#315). Thanks @forest-benchling! - Fixed a typo in the async example in generated README.md files (#337). Thanks @synchronizing!
- Fix deserialization of
None
andUnset
properties for all types by unifying the checks (#334). Thanks @forest-benchling! - If duplicate model names are detected during generation, you'll now get an error message instead of broken code (#336). Thanks @forest-benchling!
- Fixes
Enum
deserialization when the value isUNSET
(#306). Thanks @bowenwr!