FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: Allow None in enum properties [#504, #512]. Thanks @juspence! by dbanty · Pull Request #516 · openapi-generators/openapi-python-client · GitHub

Repository navigation

fix: Allow None in enum properties [#504, #512]. Thanks @juspence! - #516

Merged
dbanty merged 3 commits into
mainfrom
juspence/main
Oct 17, 2021
Merged

dbanty merged 3 commits into
mainfrom
juspence/main

Conversation

dbanty commented Oct 17, 2021

Copy link
Copy Markdown
Collaborator

Based on #512, fixes #504.

juspence and others added 3 commits October 16, 2021 20:15
Needed for some OpenAPI schemas generated by django-rest-framework / drf-spectacular.
For enums which only allow None, add new null_enum.py.jinja template
For enums with mixed values, add logic to remove None from list
Mark enum property as nullable if None isn't the only value
Add tests for enums with mixed values and only null values
TODO: Make the type checker stop failing, but PTO next week
dbanty added this to the 0.10.6 milestone Oct 17, 2021

codecov Bot commented Oct 17, 2021 •
edited
Loading

Copy link
Copy Markdown

Codecov Report

Merging #516 (60b5ac9) into main (2f82310) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main      #516   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           48        48           
  Lines         1628      1636    +8     
=========================================
+ Hits          1628      1636    +8     
Impacted Files Coverage Δ
...i_python_client/parser/properties/enum_property.py 100.00% <ø> (ø)
...penapi_python_client/parser/properties/__init__.py 100.00% <100.00%> (ø)
...on_client/schema/openapi_schema_pydantic/schema.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2f82310...60b5ac9. Read the comment docs.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support None / null as enum values

2 participants


Back | FazBrowse Home | New Git URL