Commit a2db39a2 authored by Laurent Wouters's avatar Laurent Wouters
Browse files

Fixes handling of @eid and @type attributes

parent 746b59f1489d
......@@ -147,10 +147,20 @@ class TsSchemaGenerator:
if parent is not None:
self._print(" extends %s" % parent.type)
self._print(" {\n")
if parent is None:
self._print(" /**\n")
self._print(" * The entity's EID\n")
self._print(" */\n")
self._print(" \"@eid\": number;\n")
self._print(" /**\n")
self._print(" * The name of the entity's type\n")
self._print(" */\n")
self._print(" \"@type\": string;\n")
all_relations = []
for relation in entity.subject_relations():
if relation.type == "eid":
self._handle_attribute(entity, relation)
# do not handle here
continue
elif relation.final:
self._handle_attribute(entity, relation)
else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment