Module 模块
作为分解应用复杂性、支持导入导出的基本单元。目前这个版本是兼容版,只支持三种类型:扩展模块、接口应用、扩展组件。与后续产品制定的模块类型不冲突。
1. 结构声明
- TS Declaration
- JSON Schema
class Module extends BaseNode {
type: 'extension' | 'interface' | 'component' | 'connector' | 'customInterface';
version: string;
name: string = '';
title: string;
description: string;
provider: string;
externalDependencyMap: {
maven?: Array<{
groupId: string;
artifactId: string;
version: string;
}>;
};
compilerInfoMap: {
java?: Array<{
packageName: string;
className: string;
naslName: string;
type: string;
javaTypes: Map<string, string>;
}>;
js?: {
prefix: string;
};
} | Map<string, string>;
dataSources: Array<DataSource>;
structures: Array<Structure>;
enums: Array<Enum>;
logics: Array<Logic>;
interfaces: Array<AbstractInterface>;
views: Array<View>;
frontendVariables: Array<Variable>;
processes: Array<Process>;
frontends: Array<FrontendLibrary>;
configuration: Configuration;
triggerLaunchers: Array<TriggerLauncher>;
connections: Array<Connection>;
metadataTypes: Array<MetadataType>;
}
{
"type": "object",
"properties": {
"composedBy": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string",
"enum": [
"extension",
"interface",
"component",
"connector",
"customInterface"
]
},
"version": {
"type": "string"
},
"name": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"provider": {
"type": "string"
},
"externalDependencyMap": {
"type": "object",
"properties": {
"maven": {
"type": "array",
"items": {
"type": "object",
"properties": {
"groupId": {
"type": "string"
},
"artifactId": {
"type": "string"
},
"version": {
"type": "string"
}
},
"required": [
"groupId",
"artifactId",
"version"
],
"additionalProperties": false
}
}
},
"additionalProperties": false
},
"compilerInfoMap": {
"anyOf": [
{
"type": "object",
"properties": {
"java": {
"type": "array",
"items": {
"type": "object",
"properties": {
"packageName": {
"type": "string"
},
"className": {
"type": "string"
},
"naslName": {
"type": "string"
},
"type": {
"type": "string"
},
"javaTypes": {
"type": "object",
"properties": {
"size": {
"type": "number"
}
},
"required": [
"size"
],
"additionalProperties": false
}
},
"required": [
"packageName",
"className",
"naslName",
"type",
"javaTypes"
],
"additionalProperties": false
}
},
"js": {
"type": "object",
"properties": {
"prefix": {
"type": "string"
}
},
"required": [
"prefix"
],
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"properties": {
"size": {
"type": "number"
}
},
"required": [
"size"
],
"additionalProperties": false
}
]
},
"dataSources": {
"type": "array",
"items": {
"$ref": "#/definitions/DataSource"
}
},
"structures": {
"type": "array",
"items": {
"$ref": "#/definitions/Structure"
}
},
"enums": {
"type": "array",
"items": {
"$ref": "#/definitions/Enum"
}
},
"logics": {
"type": "array",
"items": {
"$ref": "#/definitions/Logic"
}
},
"interfaces": {
"type": "array",
"items": {
"$ref": "#/definitions/AbstractInterface"
}
},
"views": {
"type": "array",
"items": {
"$ref": "#/definitions/View"
}
},
"frontendVariables": {
"type": "array",
"items": {
"$ref": "#/definitions/Variable"
}
},
"processes": {
"type": "array",
"items": {
"$ref": "#/definitions/Process"
}
},
"frontends": {
"type": "array",
"items": {
"$ref": "#/definitions/FrontendLibrary"
}
},
"configuration": {
"$ref": "#/definitions/Configuration"
},
"triggerLaunchers": {
"type": "array",
"items": {
"$ref": "#/definitions/TriggerLauncher"
}
},
"connections": {
"type": "array",
"items": {
"$ref": "#/definitions/Connection"
}
},
"metadataTypes": {
"type": "array",
"items": {
"$ref": "#/definitions/MetadataType"
}
}
},
"required": [
"type",
"version",
"name",
"title",
"description",
"provider",
"externalDependencyMap",
"compilerInfoMap",
"dataSources",
"structures",
"enums",
"logics",
"interfaces",
"views",
"frontendVariables",
"processes",
"frontends",
"configuration",
"triggerLaunchers",
"connections",
"metadataTypes"
],
"additionalProperties": false
}