Add Enum schema strategy - #57
Conversation
Add a new subclass of `SchemaStrategy` for supporting the 'enum` keyword. The `Enum` class keeps track of a `set` that contains all of the values that were provided by the 'enum' keywords in the schemas. When the builder is converted to a schema, this set is converted to a list.
|
@wolverdude I just set |
|
Hey, thanks for doing this! I'm not sure a separate Strategy class is warranted here though. Strategies are generally based on Given the complexity, it may be best if I implement this myself, but I do think support for Unrelatedly, the test failures are not your fault, but I just merged a fix for them, so just merge in |
|
This PR has been inactive for months. @mbercx do you intend to merge this or should I close it? |
|
Hi @wolverdude, sorry for the slow response! I won't have time to adapt the PR to your suggestion of adding the logic to the base class, especially since it's been a while since I looked at this. 😅 So feel free to close the PR if you think that is the better approach! |
|
Thanks. I'll wait for upvotes or implement Enum if/when I get around to it. |
Fixes #46
Add a new subclass of
SchemaStrategyfor supporting the 'enum`keyword.
The
Enumclass keeps track of asetthat contains all of the valuesthat were provided by the 'enum' keywords in the schemas. When the
builder is converted to a schema, this set is converted to a list.