Skip to content
Snippets Groups Projects
Commit cdbebd84 authored by Florian Spreckelsen's avatar Florian Spreckelsen
Browse files

FIX: Set description of referenced RTs in lists

parent a94319fe
No related branches found
No related tags found
2 merge requests!39Release 0.4.0,!33F json schema datamodel
...@@ -634,7 +634,9 @@ class JsonSchemaParser(Parser): ...@@ -634,7 +634,9 @@ class JsonSchemaParser(Parser):
else: else:
raise NotImplementedError( raise NotImplementedError(
f"Cannot parse items of type '{elt['type']}' (yet).") f"Cannot parse items of type '{elt['type']}' (yet).")
if "description" in elt: if "description" in elt and ent.description is None:
# There is a description and it hasn't been set by another
# treat_something function
ent.description = elt["description"] ent.description = elt["description"]
self.model[name] = ent self.model[name] = ent
...@@ -661,6 +663,8 @@ class JsonSchemaParser(Parser): ...@@ -661,6 +663,8 @@ class JsonSchemaParser(Parser):
rt.add_property(prop_ent, importance=importance, rt.add_property(prop_ent, importance=importance,
datatype=db.LIST(prop_ent)) datatype=db.LIST(prop_ent))
if "description" in elt:
rt.description = elt["description"]
return rt return rt
def _treat_enum(self, elt: dict, name: str): def _treat_enum(self, elt: dict, name: str):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment