0056-misc-remove-dead-code-62099.patch
passerelle/utils/xml.py | ||
---|---|---|
332 | 332 |
base_schema['oneOf'].append({'type': 'null'}) |
333 | 333 |
return base_schema |
334 | 334 |
return {'oneOf': [{'type': 'null'}, base_schema]} |
335 |
elif xmltype.has_simple_content(): |
|
336 |
base_schema = cls.type_to_jsonschema(xmltype.base_type) |
|
337 |
if not xmltype.attributes: |
|
338 |
schema = base_schema |
|
339 |
else: |
|
340 |
cls.attributegroup_to_jsonschema(xmltype.attributes) |
|
341 |
schema['properties']['$'] = base_schema |
|
342 |
return schema |
|
343 | 335 |
else: |
344 | 336 |
if xmltype.has_mixed_content() or xmltype.name == xmlschema_names.XSD_ANY_TYPE: |
345 | 337 |
raise NotImplementedError(xmltype) |
346 |
- |