We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 84cf29b commit 6012846Copy full SHA for 6012846
fastjsonschema/generator.py
@@ -254,17 +254,9 @@ def _expand_refs(self, definition):
254
return [self._expand_refs(v) for v in definition]
255
if not isinstance(definition, dict):
256
return definition
257
- if "$ref" in definition:
+ if "$ref" in definition and isinstance(definition["$ref"], str):
258
with self._resolver.resolving(definition["$ref"]) as schema:
259
return schema
260
- if "properties" in definition:
261
- return {
262
- **definition,
263
- "properties": {
264
- k: self._expand_refs(v)
265
- for k, v in definition["properties"].items()
266
- }
267
268
return {k: self._expand_refs(v) for k, v in definition.items()}
269
270
def create_variable_with_length(self):
0 commit comments