-
Notifications
You must be signed in to change notification settings - Fork 6
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 support for enums w/o needing to manually specify variations #97
Conversation
Pull Request Test Coverage Report for Build 12270279849Details
💛 - Coveralls |
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.
LGTM 👍
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.
Nice work with this feature request 👏
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.
Nice one on helping open source 😆
Despite the tests passing, this isn't working. My assumption is it's because we don't have any tests covering field types defined in another package/file. Investigating. |
Fixes #89
It will only attempt to figure out the variations if type:"enum" is specified and len(enums) is 0.
i.e. if someone uses the {enum} comment, or, for some reason, {enum: }.
The only edge cases I can think of here are in our own code, where we sometimes might not want "all" or "" exposed as enum options in the API even though they technically exist. In which case we'd still need to manually specify all the fields like we were doing prior to now.