refactoring schemaDocument
This commit is contained in:
1 parent
c71b8efd05
commit
50a2bfc6b9
40 files changed
+370
-370
No files matched your search
+12
-12
@@ -61,9 +61,9 @@ function newAppPostLoader() {
|
||||
schemas.array.appSchema = JSON.parse(schema)
|
||||
|
||||
for (let j = 0; j < schemas.array.appSchema.length; j++) {
|
||||
let nodeDefinition = schemas.array.appSchema[j]
|
||||
let key = nodeDefinition.type
|
||||
schemas.map.appSchema.set(key, nodeDefinition)
|
||||
let schemaDocument = schemas.array.appSchema[j]
|
||||
let key = schemaDocument.type
|
||||
schemas.map.appSchema.set(key, schemaDocument)
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err.stack)
|
||||
@@ -81,9 +81,9 @@ function newAppPostLoader() {
|
||||
schemas.array.docsNodeSchema = JSON.parse(schema)
|
||||
|
||||
for (let j = 0; j < schemas.array.docsNodeSchema.length; j++) {
|
||||
let nodeDefinition = schemas.array.docsNodeSchema[j]
|
||||
let key = nodeDefinition.type
|
||||
schemas.map.docsNodeSchema.set(key, nodeDefinition)
|
||||
let schemaDocument = schemas.array.docsNodeSchema[j]
|
||||
let key = schemaDocument.type
|
||||
schemas.map.docsNodeSchema.set(key, schemaDocument)
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err.stack)
|
||||
@@ -101,9 +101,9 @@ function newAppPostLoader() {
|
||||
schemas.array.docsConceptSchema = JSON.parse(schema)
|
||||
|
||||
for (let j = 0; j < schemas.array.docsConceptSchema.length; j++) {
|
||||
let nodeDefinition = schemas.array.docsConceptSchema[j]
|
||||
let key = nodeDefinition.type
|
||||
schemas.map.docsConceptSchema.set(key, nodeDefinition)
|
||||
let schemaDocument = schemas.array.docsConceptSchema[j]
|
||||
let key = schemaDocument.type
|
||||
schemas.map.docsConceptSchema.set(key, schemaDocument)
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err.stack)
|
||||
@@ -121,9 +121,9 @@ function newAppPostLoader() {
|
||||
schemas.array.docsTopicSchema = JSON.parse(schema)
|
||||
|
||||
for (let j = 0; j < schemas.array.docsTopicSchema.length; j++) {
|
||||
let nodeDefinition = schemas.array.docsTopicSchema[j]
|
||||
let key = nodeDefinition.type
|
||||
schemas.map.docsTopicSchema.set(key, nodeDefinition)
|
||||
let schemaDocument = schemas.array.docsTopicSchema[j]
|
||||
let key = schemaDocument.type
|
||||
schemas.map.docsTopicSchema.set(key, schemaDocument)
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err.stack)
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
function getNodeDefinition(node, project) {
|
||||
function getSchemaDocument(node, project) {
|
||||
if (node === null || node === undefined) {
|
||||
console.log('[Error] Can not get the node definition of a null or undefined node ')
|
||||
console.log('[Error] Can not get the schema document of a null or undefined node ')
|
||||
return
|
||||
}
|
||||
if (project === undefined) { project = node.project }
|
||||
|
||||
Reference in new issue
Block a user