@@ -24,31 +24,35 @@ export const baseSchemas = {
2424 Unit : "workflow-unit" ,
2525} ;
2626
27- const entityMix = [
27+ export const entityMix = [
2828 "system-description-object" ,
2929 "system-base-entity-set" ,
3030 "system-sharing" ,
3131 "system-metadata" ,
3232 "system-defaultable" ,
3333] ;
3434
35- const subWorkflowMix = [ "system-system-name" , "system-is-multi-material" ] ;
35+ export const subWorkflowMix = [ "system-system-name" , "system-is-multi-material" ] ;
3636
37- const workflowMix = [ "workflow-base-flow" , "system-history" , "system-is-outdated" ] ;
37+ export const workflowMix = [ "workflow-base-flow" , "system-history" , "system-is-outdated" ] ;
3838
39- const bankMaterialMix = [ "material-conventional" , "system-creator-account" ] ;
39+ export const bankMaterialMix = [ "material-conventional" , "system-creator-account" ] ;
4040
41- const bankWorkflowMix = [ "system-creator-account" ] ;
41+ export const bankWorkflowMix = [ "system-creator-account" ] ;
4242
43- const jobMix = [ "system-status" , "system-job-extended" ] ;
43+ export const jobMix = [ "system-status" , "system-job-extended" ] ;
4444
45- const unitMix = [ "system-unit-extended" , "system-status" , "workflow-unit-runtime-runtime-items" ] ;
45+ export const unitMix = [
46+ "system-unit-extended" ,
47+ "system-status" ,
48+ "workflow-unit-runtime-runtime-items" ,
49+ ] ;
4650
47- const assignmentUnitMix = [ "system-scope" ] ;
51+ export const assignmentUnitMix = [ "system-scope" ] ;
4852
49- const flavorMix = [ "system-is-multi-material" ] ;
53+ export const flavorMix = [ "system-is-multi-material" ] ;
5054
51- const systemEntityMix = [ "system-entity" ] ;
55+ export const systemEntityMix = [ "system-entity" ] ;
5256
5357export const mixSchemas = {
5458 Entity : [ ...entityMix ] ,
@@ -83,3 +87,14 @@ export function getMixSchemasByClassName(className) {
8387 ? mixSchemas [ className ] . map ( ( schemaId ) => JSONSchemasInterface . schemaById ( schemaId ) )
8488 : [ ] ;
8589}
90+
91+ /**
92+ * Register additional Entity classes to be resolved with jsonSchema property
93+ * @param {String } className - class name derived from InMemoryEntity
94+ * @param {String } classBaseSchema - base schemaId
95+ * @param {Array } classMixSchemas - array of schemaId to mix
96+ */
97+ export function registerClassName ( className , classBaseSchema , classMixSchemas ) {
98+ baseSchemas [ className ] = classBaseSchema ;
99+ mixSchemas [ className ] = classMixSchemas ;
100+ }
0 commit comments