added id fields with orm type to discovery doc
authorLinda Nichols <lynnaloo@gmail.com>
Wed, 30 Jul 2014 15:41:54 +0000 (15:41 +0000)
committerLinda Nichols <lynnaloo@gmail.com>
Wed, 30 Jul 2014 15:41:54 +0000 (15:41 +0000)
lib/orm/source/xt/javascript/discovery.sql
lib/orm/source/xt/javascript/schema.sql

index bed6756..0943f00 100644 (file)
@@ -795,6 +795,8 @@ select xt.install_js('XT','Discovery','xtuple', $$
         if (typeof method === 'function' && method.description && method.schema) {
           for (var schema in method.schema) {
             schemas[schema] = method.schema[schema];
+            schemas[schema].id = schema;
+            schemas[schema].type = 'object';
           }
         }
       }
index debd3c6..5115c1d 100644 (file)
@@ -289,7 +289,7 @@ select xt.install_js('XT','Schema','xtuple', $$
         nkey = XT.Orm.naturalKey(orm),
         pkey = XT.Orm.primaryKey(orm),
         prop,
-        ret = {},
+        ret = {"id": orm.type, "type": "object"},
         relatedORM = {},
         relatedKey,
         relatedKeyProp,