-
-
Notifications
You must be signed in to change notification settings - Fork 179
field2property rework #199
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
field2property rework #199
Conversation
Also rework field2choices for a consistent interface
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this approach is a big improvement. +1 to moving OpenAPI 3 work forward, too. Nice!
return attributes | ||
|
||
|
||
def field2write_only(field, **kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this was Python 3 only, I'd write
def field2write_only(field, *, openapi_major_version, **kwargs):
Great. Shall I merge this, then? |
LGTM 🚢 🇮🇹 |
This PR reworks field2property a bit to provide more consistency to the field2attribute methods. This makes it easier to manage different OpenAPI versions.
It also adds the
x-nullable
/nullable
andwriteOnly
attributes depending on the version.It does not address the optional spec attribute issue discussed in #197 but it is a first step.
@sloria, @Bangertm Feedback welcome.