-
Notifications
You must be signed in to change notification settings - Fork 260
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
Add additional types from the specification. #526
Conversation
d23da6d
to
f8f6b3a
Compare
hey @ngnpope, actually love this PR! thing is i deliberately only added types that are explicitly mentioned in
On the other hand these types will get support at some point in time and tooling might already include them. |
f8f6b3a
to
b00ac0b
Compare
When comparing to the data types section of the v3.0.3 specification, it seems that there are already additional formats supported in
So, I guess from that perspective, it shouldn't be a problem defining these and it is on step toward OpenAPI 3.1 that is backward compatible. Maybe we just need to expand the documentation to say which ones are defined under which specifications? Either way, I think the first commit should land for mapping from Python types. (I also notice that I accidentally included that |
b00ac0b
to
97a479f
Compare
Codecov Report
@@ Coverage Diff @@
## master #526 +/- ##
=======================================
Coverage 98.62% 98.62%
=======================================
Files 58 58
Lines 6028 6038 +10
=======================================
+ Hits 5945 5955 +10
Misses 83 83
Continue to review full report at Codecov.
|
97a479f
to
48fbf52
Compare
48fbf52
to
e9a57bc
Compare
that's a fair point. i agree the benefits outweigh the potential problems i removed i merged the PR without noticing it was a ff. github does not understand this apparently. your commits are not on master so i'll close this. |
i meant: your commits are now on master. worst possible typo for that confusing PR state. sry. |
😂 Thank you! |
The first commit adds some additional type mappings for more Python types available in the standard library.
The second commit adds support for missing formats that are defined in the specification:
I guess many of these may be too obscure. If you don't want them, we could perhaps just add
regex
as that seems most useful.