diff --git a/src/caosadvancedtools/models/parser.py b/src/caosadvancedtools/models/parser.py index b3557c76ed311f3323138f741a6c2e538c641135..0180e4d1ab4595101588abe7380a09abcf94089a 100644 --- a/src/caosadvancedtools/models/parser.py +++ b/src/caosadvancedtools/models/parser.py @@ -634,7 +634,9 @@ class JsonSchemaParser(Parser): else: raise NotImplementedError( 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"] self.model[name] = ent @@ -661,6 +663,8 @@ class JsonSchemaParser(Parser): rt.add_property(prop_ent, importance=importance, datatype=db.LIST(prop_ent)) + if "description" in elt: + rt.description = elt["description"] return rt def _treat_enum(self, elt: dict, name: str):