Index: tools/json_schema_compiler/schema_util.py |
diff --git a/tools/json_schema_compiler/schema_util.py b/tools/json_schema_compiler/schema_util.py |
index 289d24df7c43770a270895657996629d5d16c2e4..a0a4d48bd9217d266bf1d40ff0e5b4997247b7ac 100644 |
--- a/tools/json_schema_compiler/schema_util.py |
+++ b/tools/json_schema_compiler/schema_util.py |
@@ -4,6 +4,13 @@ |
"""Utilies for the processing of schema python structures. |
""" |
+from model import PropertyType |
+ |
+def IsLocalReference(prop, namespace): |
+ return ((prop.type_ == PropertyType.REF) and |
+ ((not '.' in prop.ref_type) or |
+ prop.ref_type.startswith(namespace + '.'))) |
+ |
def StripSchemaNamespace(s): |
last_dot = s.rfind('.') |
if not last_dot == -1: |