Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for datamodel-code-generator's enum-field-as-literal argument #224

Merged
merged 1 commit into from
Dec 3, 2021

Conversation

LongBeachHXC
Copy link
Contributor

This is due to my use case of needing to use the oneOf or anyOf keyword in my open api spec.

I was running into this exact issue that describes the need to use a Literal type for it to be parsed and validated correctly by pydantic.

I really appreciate your work on this.

@codecov
Copy link

codecov bot commented Dec 3, 2021

Codecov Report

Merging #224 (68dfe2e) into master (8ff4b62) will decrease coverage by 0.93%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #224      +/-   ##
==========================================
- Coverage   93.37%   92.43%   -0.94%     
==========================================
  Files           2        2              
  Lines         287      291       +4     
==========================================
+ Hits          268      269       +1     
- Misses         19       22       +3     
Flag Coverage Δ
unittests 92.43% <50.00%> (-0.94%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
fastapi_code_generator/__main__.py 84.61% <50.00%> (-2.75%) ⬇️

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 127dddd...68dfe2e. Read the comment docs.

@koxudaxi koxudaxi merged commit b582125 into koxudaxi:master Dec 3, 2021
@koxudaxi
Copy link
Owner

koxudaxi commented Dec 3, 2021

@LongBeachHXC
Thank you for creating this issue.
I published the version as 0.3.4 🎉

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.

2 participants