diff --git a/json2mo/storedDefiniton.js b/json2mo/storedDefiniton.js index f1c6b3b2..f283da0b 100644 --- a/json2mo/storedDefiniton.js +++ b/json2mo/storedDefiniton.js @@ -17,8 +17,8 @@ function parse (content, rawJson = false) { }) } } else { - if (content.class_definition != null) { - content.class_definition.forEach(ele => { + if (content.stored_class_definition != null) { + content.stored_class_definition.forEach(ele => { moOutput += finalClassDefinitionParser.parse(ele, rawJson) moOutput += '\n' }) diff --git a/lib/jsonquery.js b/lib/jsonquery.js index f4553c7d..6d7d265a 100644 --- a/lib/jsonquery.js +++ b/lib/jsonquery.js @@ -27,7 +27,7 @@ function simplifyModelicaJSON (model, parseMode) { } return Object.assign( { within }, - { class_definition: claDefArr }, + { stored_class_definition: claDefArr }, { modelicaFile: model.modelicaFile }, { fullMoFilePath: model.fullMoFilePath }, { checksum: model.checksum }) diff --git a/lib/parser.js b/lib/parser.js index d7414840..ad1135e6 100644 --- a/lib/parser.js +++ b/lib/parser.js @@ -203,7 +203,7 @@ function generateCxf (jsonOutput, moFile, tempDir, prettyPrint, generateElementa */ function getInstantiatedFile (data, moFile) { const within = data.within - const claDef = data.class_definition + const claDef = data.stored_class_definition let insCla = [] claDef.forEach(function (obj) { const claLis = instantiatedClass(within, obj, moFile) diff --git a/schema-modelica.json b/schema-modelica.json index a401d2fe..7e60a515 100644 --- a/schema-modelica.json +++ b/schema-modelica.json @@ -3,8 +3,14 @@ "$id": "schema-modelica.json", "title": "JSON parsed Modelica file", "description": "Json representation of a Modelica model", - "$comment": "Version 2, 12/05/2022", + "$comment": "08/29/2024", "definitions": { + "stored_class_definitions": { + "description": "Stored class definitions", + "type": "array", + "additionalItems": false, + "items": { "$ref": "#/definitions/class_definition" } + }, "class_definition": { "description": "Class definition", "type": "array",