-
-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
Thanks for creating the library! jsonref is able to resolve the recursive references but it's impossible to serialize the resolved schema since it includes circular references as follows:
pprint.pprint(value)
{'components': {'schemas': {'filter': {'properties': {'and': {'items': <Recursion on dict with id=4621593792>,
'type': 'array'}}},
'filterList': {'items': {'properties': {'and': <Recursion on dict with id=4621593216>}},
'type': 'array'}}},
json.dumps(value)
print(json.dumps(dumps))
File "/usr/local/Cellar/[email protected]/3.9.12/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/__init__.py", line 231, in dumps
return _default_encoder.encode(obj)
File "/usr/local/Cellar/[email protected]/3.9.12/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/local/Cellar/[email protected]/3.9.12/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
ValueError: Circular reference detected
The json-schema-ref-parser library supports the circular references, the support for the option bundle in jsonref would be great.
Metadata
Metadata
Assignees
Labels
No labels