jsonschema2popo
jsonschema2popo copied to clipboard
Use of enum.Enum
Hello,
Some of my enum values are like so "_whatever_", which is not supported by enum.Enum. See https://docs.python.org/3.6/library/enum.html#allowed-members-and-attributes-of-enumerations
The rules for what is allowed are as follows: names that start and end with a single underscore are reserved by enum and cannot be used
In addition, it is not supported natively by json.dump (TypeError: Object of type '..._enum' is not JSON serializable).
Since you don't really use the advantages of the Enum, why not just use a list of allowed values for _{{prop._name}}_enum ?