Index: trunk/src/tools/json_schema_compiler/model.py |
=================================================================== |
--- trunk/src/tools/json_schema_compiler/model.py (revision 232015) |
+++ trunk/src/tools/json_schema_compiler/model.py (working copy) |
@@ -141,7 +141,7 @@ |
self.ref_type = json['$ref'] |
elif 'enum' in json and json_type == 'string': |
self.property_type = PropertyType.ENUM |
- self.enum_values = [EnumValue(value) for value in json['enum']] |
+ self.enum_values = [value for value in json['enum']] |
elif json_type == 'any': |
self.property_type = PropertyType.ANY |
elif json_type == 'binary': |
@@ -343,20 +343,6 @@ |
unix_name = property(GetUnixName, SetUnixName) |
-class EnumValue(object): |
- """A single value from an enum. |
- Properties: |
- - |name| name of the property as in the json. |
- - |description| a description of the property (if provided) |
- """ |
- def __init__(self, json): |
- if isinstance(json, dict): |
- self.name = json['name'] |
- self.description = json.get('description') |
- else: |
- self.name = json |
- self.description = None |
- |
class _Enum(object): |
"""Superclass for enum types with a "name" field, setting up repr/eq/ne. |
Enums need to do this so that equality/non-equality work over pickling. |