You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/concerto-core/lib/basemodelmanager.js
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -794,16 +794,20 @@ class BaseModelManager {
794
794
/**
795
795
* Populates the model manager from a models metamodel AST
796
796
* @param {*} ast the metamodel
797
+
* @param {object} [options] - options for the from ast method
798
+
* @param {object} [options.disableValidation] - option to disable metamodel validation and just fetch the models, to be used only if the metamodel is already validated
797
799
*/
798
-
fromAst(ast){
800
+
fromAst(ast,options){
799
801
this.clearModelFiles();
800
802
ast.models.forEach(model=>{
801
803
if(!EXCLUDE_NS.includes(model.namespace)){// excludes the internal namespaces, already added
* @param {boolean} [options.migrate] - migrate the decoratorCommandSet $class to match the dcs model version
371
372
* @param {boolean} [options.defaultNamespace] - the default namespace to use for decorator commands that include a decorator without a namespace
372
373
* @param {boolean} [options.enableDcsNamespaceTarget] - flag to control applying namespace targeted decorators on top of the namespace instead of all declarations in that namespace
374
+
* @param {boolean} [options.skipValidationAndResolution] - optional flag to disable both metamodel resolution and validation, only use if you are sure that the model manager has fully resolved models
375
+
* @param {boolean} [options.disableMetamodelResolution] - flag to disable metamodel resolution, only use if you are sure that the model manager has fully resolved models
376
+
* @param {boolean} [options.disableMetamodelValidation] - flag to disable metamodel validation, only use if you are sure that the models and decorators are already validated
373
377
* @returns {ModelManager} a new model manager with the decorations applied
Copy file name to clipboardExpand all lines: packages/concerto-core/types/lib/basemodelmanager.d.ts
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -348,8 +348,12 @@ declare class BaseModelManager {
348
348
/**
349
349
* Populates the model manager from a models metamodel AST
350
350
* @param {*} ast the metamodel
351
+
* @param {object} [options] - options for the from ast method
352
+
* @param {object} [options.disableValidation] - option to disable metamodel validation and just fetch the models, to be used only if the metamodel is already validated
351
353
*/
352
-
fromAst(ast: any): void;
354
+
fromAst(ast: any,options?: {
355
+
disableValidation?: object;
356
+
}): void;
353
357
/**
354
358
* Get the full ast (metamodel instances) for a modelmanager
355
359
* @param {boolean} [resolve] - whether to resolve names
0 commit comments