@simitgroup/simpleapp-generator 1.6.6-o-alpha → 1.6.6-q-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/buildinschemas/autoincreament.d.ts.map +1 -1
- package/dist/buildinschemas/autoincreament.js +17 -14
- package/dist/buildinschemas/autoincreament.js.map +1 -1
- package/dist/buildinschemas/branch.d.ts.map +1 -1
- package/dist/buildinschemas/branch.js +25 -24
- package/dist/buildinschemas/branch.js.map +1 -1
- package/dist/buildinschemas/changehistories.d.ts.map +1 -1
- package/dist/buildinschemas/changehistories.js +10 -9
- package/dist/buildinschemas/changehistories.js.map +1 -1
- package/dist/buildinschemas/customfield.d.ts.map +1 -1
- package/dist/buildinschemas/customfield.js +16 -15
- package/dist/buildinschemas/customfield.js.map +1 -1
- package/dist/buildinschemas/docnoformat.d.ts.map +1 -1
- package/dist/buildinschemas/docnoformat.js +34 -23
- package/dist/buildinschemas/docnoformat.js.map +1 -1
- package/dist/buildinschemas/documentevent.d.ts.map +1 -1
- package/dist/buildinschemas/documentevent.js +36 -26
- package/dist/buildinschemas/documentevent.js.map +1 -1
- package/dist/buildinschemas/keyvaluepair.d.ts.map +1 -1
- package/dist/buildinschemas/keyvaluepair.js +7 -6
- package/dist/buildinschemas/keyvaluepair.js.map +1 -1
- package/dist/buildinschemas/organization.d.ts.map +1 -1
- package/dist/buildinschemas/organization.js +34 -30
- package/dist/buildinschemas/organization.js.map +1 -1
- package/dist/buildinschemas/permission.d.ts.map +1 -1
- package/dist/buildinschemas/permission.js +16 -7
- package/dist/buildinschemas/permission.js.map +1 -1
- package/dist/buildinschemas/systemmessage.d.ts.map +1 -1
- package/dist/buildinschemas/systemmessage.js +35 -32
- package/dist/buildinschemas/systemmessage.js.map +1 -1
- package/dist/buildinschemas/tenant.d.ts.map +1 -1
- package/dist/buildinschemas/tenant.js +17 -16
- package/dist/buildinschemas/tenant.js.map +1 -1
- package/dist/buildinschemas/user.d.ts.map +1 -1
- package/dist/buildinschemas/user.js +34 -31
- package/dist/buildinschemas/user.js.map +1 -1
- package/dist/buildinschemas/webhook.d.ts.map +1 -1
- package/dist/buildinschemas/webhook.js +24 -23
- package/dist/buildinschemas/webhook.js.map +1 -1
- package/dist/framework.d.ts +2 -0
- package/dist/framework.d.ts.map +1 -1
- package/dist/framework.js +92 -57
- package/dist/framework.js.map +1 -1
- package/dist/generate.d.ts.map +1 -1
- package/dist/generate.js +175 -34
- package/dist/generate.js.map +1 -1
- package/dist/index.js +30 -12
- package/dist/index.js.map +1 -1
- package/dist/processors/jsonschemabuilder.js +14 -12
- package/dist/processors/jsonschemabuilder.js.map +1 -1
- package/dist/type.d.ts +44 -5
- package/dist/type.d.ts.map +1 -1
- package/dist/type.js.map +1 -1
- package/package.json +1 -1
- package/src/buildinschemas/autoincreament.ts +35 -33
- package/src/buildinschemas/branch.ts +47 -47
- package/src/buildinschemas/changehistories.ts +31 -30
- package/src/buildinschemas/customfield.ts +17 -16
- package/src/buildinschemas/docnoformat.ts +54 -43
- package/src/buildinschemas/documentevent.ts +42 -33
- package/src/buildinschemas/keyvaluepair.ts +25 -25
- package/src/buildinschemas/organization.ts +54 -50
- package/src/buildinschemas/permission.ts +34 -25
- package/src/buildinschemas/systemmessage.ts +39 -38
- package/src/buildinschemas/tenant.ts +46 -45
- package/src/buildinschemas/user.ts +64 -60
- package/src/buildinschemas/webhook.ts +62 -61
- package/src/framework.ts +307 -251
- package/src/generate.ts +608 -434
- package/src/index.ts +136 -118
- package/src/processors/jsonschemabuilder.ts +6 -4
- package/src/type.ts +287 -226
- package/templates/basic/miniAppJsSdk/resource-bridge.service.ts.eta +119 -0
- package/templates/basic/miniAppStreamlitSdk/resource-bridge.service.ts.eta +228 -0
- package/templates/basic/nuxt/jsonschema.ts.eta +7 -0
- package/templates/basic/nuxt/resource-bridge.editable.service.ts.eta +40 -0
- package/templates/basic/nuxt/resource-bridge.service.ts.eta +165 -0
- package/templates/basic/nuxt/simpleapp.generate.client.ts.eta +27 -9
- package/templates/miniAppJsSdk/src/index.ts.eta +28 -0
- package/templates/miniAppJsSdk/src/services/bridge-resource-accessor.service.ts.eta +70 -0
- package/templates/miniAppJsSdk/src/services/bridge.service.ts.eta +91 -0
- package/templates/miniAppJsSdk/src/types/service.type.ts.eta +22 -0
- package/templates/miniAppStreamlitSdk/simtrain_eco_mini_app_streamlit_sdk/sdk.py.eta +76 -0
- package/templates/nest/src/simpleapp/generate/jsonschemas/index.ts.eta +11 -0
- package/templates/nest/src/simpleapp/types/customfield.ts.eta +14 -0
- package/templates/nuxt/components/simpleApp/SimpleAppForm.vue.eta +3 -3
- package/templates/nuxt/components/simpleApp/SimpleAppInputTable.vue.eta +0 -1
- package/templates/nuxt/plugins/18.simpleapp-custom-field-store.ts.eta +9 -3
- package/templates/nuxt/plugins/20.simpleapp-userstore.ts.eta +316 -341
- package/templates/nuxt/simpleapp/generate/clients/SimpleAppClient.ts.eta +32 -21
- package/templates/nuxt/simpleapp/generate/jsonSchemas/index.ts.eta +11 -0
- package/templates/nuxt/simpleapp/generate/miniApp/bridge/constants/common.constant.ts.eta +16 -0
- package/templates/nuxt/simpleapp/generate/miniApp/bridge/constants/resource.constant.ts.eta +46 -0
- package/templates/nuxt/simpleapp/generate/miniApp/bridge/services/bridge-resource-accessor.service.ts.eta +63 -0
- package/templates/nuxt/simpleapp/generate/miniApp/bridge/services/bridge.service.ts.eta +129 -0
- package/templates/nuxt/simpleapp/generate/miniApp/bridge/types/bridge.type.ts.eta +81 -0
- package/templates/nuxt/simpleapp/generate/miniApp/bridge/types/resource-mapper.type.ts.eta +55 -0
- package/templates/nuxt/types/others.ts.eta +74 -65
- package/templates/nuxt/types/schema.ts.eta +225 -188
- package/templates/project/build.sh.eta +4 -0
- package/templates/nuxt/simpleapp/generate/clients/SimpleAppCustomFieldClient.ts.eta +0 -191
package/src/type.ts
CHANGED
|
@@ -1,18 +1,24 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {
|
|
2
|
+
JSONSchema7,
|
|
3
|
+
JSONSchema7Type,
|
|
4
|
+
JSONSchema7Version,
|
|
5
|
+
JSONSchema7TypeName,
|
|
6
|
+
JSONSchema7Definition
|
|
7
|
+
} from 'json-schema';
|
|
2
8
|
export type ChildModels = {
|
|
3
|
-
[key: string]: {
|
|
4
|
-
type: string;
|
|
5
|
-
model: SchemaModel
|
|
6
|
-
codeField:string
|
|
7
|
-
nameField:string
|
|
8
|
-
moreAutoComplete?:string[]
|
|
9
|
-
docStatusSettings?:DocumentStatus[]
|
|
10
|
-
apiSettings?:DocumentApi[]
|
|
9
|
+
[key: string]: {
|
|
10
|
+
type: string;
|
|
11
|
+
model: SchemaModel;
|
|
12
|
+
codeField: string;
|
|
13
|
+
nameField: string;
|
|
14
|
+
moreAutoComplete?: string[];
|
|
15
|
+
docStatusSettings?: DocumentStatus[];
|
|
16
|
+
apiSettings?: DocumentApi[];
|
|
11
17
|
// requireautocomplete: boolean
|
|
12
|
-
isolationtype:string
|
|
13
|
-
hasdocformat:boolean
|
|
14
|
-
foreignkeys:MyForeignKey
|
|
15
|
-
required: string[]
|
|
18
|
+
isolationtype: string;
|
|
19
|
+
hasdocformat: boolean;
|
|
20
|
+
foreignkeys: MyForeignKey;
|
|
21
|
+
required: string[];
|
|
16
22
|
};
|
|
17
23
|
};
|
|
18
24
|
export enum Fieldtypes {
|
|
@@ -21,7 +27,7 @@ export enum Fieldtypes {
|
|
|
21
27
|
'array' = 'array',
|
|
22
28
|
'boolean' = 'boolean',
|
|
23
29
|
'integer' = 'integer',
|
|
24
|
-
'number' = 'number'
|
|
30
|
+
'number' = 'number'
|
|
25
31
|
}
|
|
26
32
|
export type FieldModel = {
|
|
27
33
|
title?: string; //display name
|
|
@@ -32,7 +38,7 @@ export type FieldModel = {
|
|
|
32
38
|
format?: string;
|
|
33
39
|
required?: boolean;
|
|
34
40
|
example?: any;
|
|
35
|
-
// examples?: any;
|
|
41
|
+
// examples?: any;
|
|
36
42
|
};
|
|
37
43
|
|
|
38
44
|
// export type SchemaCategoryModel = {
|
|
@@ -43,56 +49,62 @@ export type SchemaModel = {
|
|
|
43
49
|
[key: string]: string | string[] | FieldModel | SchemaModel | SchemaModel[];
|
|
44
50
|
};
|
|
45
51
|
|
|
46
|
-
export type JsonSchemaProperties= {
|
|
47
|
-
[key: string]: JSONSchema7Definition
|
|
52
|
+
export type JsonSchemaProperties = {
|
|
53
|
+
[key: string]: JSONSchema7Definition;
|
|
48
54
|
// JSONSchema7Definition ,JSONSchema7
|
|
49
|
-
}
|
|
55
|
+
};
|
|
50
56
|
|
|
51
57
|
//foreign key setting in current document
|
|
52
58
|
export type MyForeignKey = {
|
|
53
|
-
[collectionname:string]:string[]
|
|
54
|
-
}
|
|
55
|
-
|
|
59
|
+
[collectionname: string]: string[];
|
|
60
|
+
};
|
|
56
61
|
|
|
57
62
|
//centralize foreignkey catalogue for all document
|
|
58
63
|
export type TypeForeignKeyCatalogue = {
|
|
59
|
-
[cataloguename:string]:TypeForeignKey
|
|
60
|
-
}
|
|
61
|
-
export type TypeForeignKey={
|
|
62
|
-
[collection:string]:string[]
|
|
63
|
-
}
|
|
64
|
+
[cataloguename: string]: TypeForeignKey;
|
|
65
|
+
};
|
|
66
|
+
export type TypeForeignKey = {
|
|
67
|
+
[collection: string]: string[];
|
|
68
|
+
};
|
|
64
69
|
export type ModuleObject = {
|
|
65
|
-
doctype:string
|
|
66
|
-
docname:string
|
|
67
|
-
pagetype:string
|
|
68
|
-
api:DocumentApi[]
|
|
69
|
-
schema:SimpleAppJSONSchema7
|
|
70
|
-
}
|
|
71
|
-
export type TypeGenerateDocumentVariable ={
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
70
|
+
doctype: string;
|
|
71
|
+
docname: string;
|
|
72
|
+
pagetype: string;
|
|
73
|
+
api: DocumentApi[];
|
|
74
|
+
schema: SimpleAppJSONSchema7;
|
|
75
|
+
};
|
|
76
|
+
export type TypeGenerateDocumentVariable = {
|
|
77
|
+
/**
|
|
78
|
+
* Resource Name should be a readable name with camelCase.
|
|
79
|
+
* Ex: studentSummary
|
|
80
|
+
*/
|
|
81
|
+
resourceName: string;
|
|
82
|
+
name: string;
|
|
83
|
+
doctype: string;
|
|
84
|
+
models: ChildModels;
|
|
85
|
+
autocompletecode: string;
|
|
86
|
+
autocompletename: string;
|
|
87
|
+
moreAutoComplete: string[];
|
|
88
|
+
schema: SchemaModel;
|
|
89
|
+
apiSchemaName: string;
|
|
90
|
+
typename: string;
|
|
91
|
+
fullApiSchemaName: string;
|
|
92
|
+
fullTypeName: string;
|
|
93
|
+
jsonschema: SimpleAppJSONSchema7;
|
|
94
|
+
bothEndCode: string;
|
|
95
|
+
frontEndCode: string;
|
|
96
|
+
backEndCode: string;
|
|
97
|
+
controllerCode: string;
|
|
98
|
+
apiSchemaCode: string;
|
|
99
|
+
docStatusSettings: DocumentStatus[];
|
|
100
|
+
apiSettings: DocumentApi[];
|
|
101
|
+
isolationtype: string;
|
|
102
|
+
hasdocformat: boolean;
|
|
103
|
+
foreignkeys: MyForeignKey;
|
|
104
|
+
customField: {
|
|
105
|
+
isEnable: boolean;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
96
108
|
|
|
97
109
|
// export type DocSetting = {
|
|
98
110
|
// docName:string,
|
|
@@ -109,194 +121,243 @@ foreignkeys: MyForeignKey
|
|
|
109
121
|
// }
|
|
110
122
|
|
|
111
123
|
export type DocumentStatus = {
|
|
112
|
-
status:string
|
|
113
|
-
statusName:string
|
|
114
|
-
readOnly:boolean
|
|
115
|
-
actions: string[]
|
|
124
|
+
status: string; //'CO', 'V', 'CL', 'D' and etc
|
|
125
|
+
statusName: string;
|
|
126
|
+
readOnly: boolean;
|
|
127
|
+
actions: string[]; //api name ['confirm','revert','close','void' and etc]
|
|
128
|
+
};
|
|
129
|
+
export enum RESTMethods {
|
|
130
|
+
'post' = 'post',
|
|
131
|
+
'get' = 'get',
|
|
132
|
+
'delete' = 'delete',
|
|
133
|
+
'put' = 'put',
|
|
134
|
+
'patch' = 'patch'
|
|
116
135
|
}
|
|
117
|
-
export enum RESTMethods {'post'='post','get'='get', 'delete'='delete','put'='put', 'patch'='patch'}
|
|
118
136
|
export type DocumentApi = {
|
|
119
|
-
action:string
|
|
120
|
-
entryPoint:string
|
|
121
|
-
queryPara?:string[]
|
|
122
|
-
requiredRole?: string[]
|
|
123
|
-
method:RESTMethods
|
|
124
|
-
responseType
|
|
125
|
-
schema
|
|
126
|
-
description:string //description of api
|
|
137
|
+
action: string; //api action name
|
|
138
|
+
entryPoint: string; //api entry point example:':id', ':id/confirm'
|
|
139
|
+
queryPara?: string[]; //what query parameter wish to accept, example: ['description','date']
|
|
140
|
+
requiredRole?: string[]; // what special user role wish to allow for this api, example: ['SuperUser']
|
|
141
|
+
method: RESTMethods;
|
|
142
|
+
responseType?: string;
|
|
143
|
+
schema?: string;
|
|
144
|
+
description: string; //description of api
|
|
145
|
+
};
|
|
146
|
+
export enum IsolationType {
|
|
147
|
+
'none' = 'none',
|
|
148
|
+
'tenant' = 'tenant',
|
|
149
|
+
'org' = 'org',
|
|
150
|
+
'branch' = 'branch'
|
|
127
151
|
}
|
|
128
|
-
export enum IsolationType {"none"="none" , "tenant"="tenant","org"="org", "branch"="branch"}
|
|
129
152
|
// export type ImportLibs = {"lib":string,"as":string}
|
|
130
|
-
export type Formula =
|
|
131
|
-
jsonPath:string
|
|
132
|
-
formula:string
|
|
133
|
-
}
|
|
153
|
+
export type Formula = {
|
|
154
|
+
jsonPath: string; //example: "$.subtotal","$.details[*]"
|
|
155
|
+
formula: string; //example "jslib.getDocumentSubTotal(@F{$.details})"
|
|
156
|
+
};
|
|
134
157
|
|
|
135
158
|
export type SchemaConfig = {
|
|
136
|
-
isolationType: IsolationType
|
|
137
|
-
requiredRoles?:string[]
|
|
138
|
-
pageType?: string
|
|
139
|
-
uniqueKey?:string
|
|
140
|
-
uniqueKeys?:string[][]
|
|
141
|
-
documentTitle?:string
|
|
142
|
-
loseDataIsolation?:boolean
|
|
143
|
-
generateDocumentNumber?:boolean
|
|
144
|
-
docNoPattern?:string
|
|
145
|
-
documentDate?:string
|
|
146
|
-
allStatus?:DocumentStatus[]
|
|
147
|
-
additionalApis?:DocumentApi[]
|
|
148
|
-
additionalAutoCompleteFields
|
|
149
|
-
search?:string[]
|
|
159
|
+
isolationType: IsolationType;
|
|
160
|
+
requiredRoles?: string[];
|
|
161
|
+
pageType?: string;
|
|
162
|
+
uniqueKey?: string;
|
|
163
|
+
uniqueKeys?: string[][];
|
|
164
|
+
documentTitle?: string;
|
|
165
|
+
loseDataIsolation?: boolean;
|
|
166
|
+
generateDocumentNumber?: boolean;
|
|
167
|
+
docNoPattern?: string;
|
|
168
|
+
documentDate?: string;
|
|
169
|
+
allStatus?: DocumentStatus[];
|
|
170
|
+
additionalApis?: DocumentApi[];
|
|
171
|
+
additionalAutoCompleteFields?: string[];
|
|
172
|
+
search?: string[];
|
|
150
173
|
// libs?:ImportLibs[] // both process class and frontend client class will import same lib
|
|
151
|
-
formulas?: Formula[]
|
|
152
|
-
documentType: string
|
|
153
|
-
documentName: string
|
|
154
|
-
collectionName?: string
|
|
155
|
-
foreignKeys?:MyForeignKey
|
|
156
|
-
printFormats?: SchemaPrintFormat[]
|
|
157
|
-
|
|
174
|
+
formulas?: Formula[];
|
|
175
|
+
documentType: string;
|
|
176
|
+
documentName: string;
|
|
177
|
+
collectionName?: string;
|
|
178
|
+
foreignKeys?: MyForeignKey;
|
|
179
|
+
printFormats?: SchemaPrintFormat[];
|
|
180
|
+
/**
|
|
181
|
+
* Resource Name **MUST** use **READABLE** name.
|
|
182
|
+
*
|
|
183
|
+
* We already have dirty name in documentType and documentName.
|
|
184
|
+
*
|
|
185
|
+
* **NOT** need another.
|
|
186
|
+
*
|
|
187
|
+
* Use Camel Case. Example:
|
|
188
|
+
* - studentGroup
|
|
189
|
+
* - teacherGroup
|
|
190
|
+
* - customField
|
|
191
|
+
*/
|
|
192
|
+
resourceName: string;
|
|
193
|
+
miniApp?: {
|
|
194
|
+
/**
|
|
195
|
+
* Define API whitelist for mini app use.
|
|
196
|
+
*
|
|
197
|
+
* Ex: list, detail, create, update, patch, delete, autoComplete, getStudentSummary
|
|
198
|
+
*
|
|
199
|
+
* {
|
|
200
|
+
* list: true,
|
|
201
|
+
* detail: {}, // object for future enhance purpose
|
|
202
|
+
* }
|
|
203
|
+
*/
|
|
204
|
+
whitelist: {
|
|
205
|
+
[key: string]: true | {};
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
customField?: {
|
|
209
|
+
isEnable?: boolean;
|
|
210
|
+
};
|
|
211
|
+
};
|
|
158
212
|
|
|
159
213
|
export type SchemaPrintFormat = {
|
|
160
|
-
formatName: string
|
|
161
|
-
formatId: string
|
|
162
|
-
description?: string
|
|
163
|
-
}
|
|
214
|
+
formatName: string;
|
|
215
|
+
formatId: string;
|
|
216
|
+
description?: string;
|
|
217
|
+
};
|
|
164
218
|
|
|
165
219
|
export type SchemaFields = {
|
|
166
|
-
_id: SimpleAppJSONSchema7
|
|
167
|
-
tenantId: SimpleAppJSONSchema7
|
|
168
|
-
orgId: SimpleAppJSONSchema7
|
|
169
|
-
branchId: SimpleAppJSONSchema7
|
|
170
|
-
created: SimpleAppJSONSchema7
|
|
171
|
-
updated: SimpleAppJSONSchema7
|
|
172
|
-
createdBy: SimpleAppJSONSchema7
|
|
173
|
-
updatedBy: SimpleAppJSONSchema7
|
|
174
|
-
[key:string]:SimpleAppJSONSchema7 | SimpleAppJSONSchema7[] | undefined
|
|
175
|
-
|
|
176
|
-
}
|
|
177
|
-
|
|
220
|
+
_id: SimpleAppJSONSchema7;
|
|
221
|
+
tenantId: SimpleAppJSONSchema7;
|
|
222
|
+
orgId: SimpleAppJSONSchema7;
|
|
223
|
+
branchId: SimpleAppJSONSchema7;
|
|
224
|
+
created: SimpleAppJSONSchema7;
|
|
225
|
+
updated: SimpleAppJSONSchema7;
|
|
226
|
+
createdBy: SimpleAppJSONSchema7;
|
|
227
|
+
updatedBy: SimpleAppJSONSchema7;
|
|
228
|
+
[key: string]: SimpleAppJSONSchema7 | SimpleAppJSONSchema7[] | undefined;
|
|
229
|
+
};
|
|
178
230
|
|
|
179
231
|
export type SchemaType = {
|
|
180
|
-
type:string
|
|
181
|
-
definitions?:SimpleAppJSONSchema7
|
|
182
|
-
required?:string[]
|
|
183
|
-
|
|
184
|
-
"x-simpleapp-config":SchemaConfig
|
|
185
|
-
properties: SchemaFields
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
|
|
232
|
+
type: string;
|
|
233
|
+
definitions?: SimpleAppJSONSchema7;
|
|
234
|
+
required?: string[];
|
|
189
235
|
|
|
236
|
+
'x-simpleapp-config': SchemaConfig;
|
|
237
|
+
properties: SchemaFields;
|
|
238
|
+
};
|
|
190
239
|
|
|
191
240
|
// modified from jsonschemas
|
|
192
241
|
export type SimpleAppJSONSchema7Definition = SimpleAppJSONSchema7 | boolean;
|
|
193
242
|
export interface SimpleAppJSONSchema7 {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
243
|
+
'x-foreignkey'?: string;
|
|
244
|
+
$id?: string | undefined;
|
|
245
|
+
$ref?: string | undefined;
|
|
246
|
+
$schema?: JSONSchema7Version | undefined;
|
|
247
|
+
$comment?: string | undefined;
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-00#section-8.2.4
|
|
251
|
+
* @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00#appendix-A
|
|
252
|
+
*/
|
|
253
|
+
$defs?:
|
|
254
|
+
| {
|
|
255
|
+
[key: string]: JSONSchema7Definition;
|
|
256
|
+
}
|
|
257
|
+
| undefined;
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1
|
|
261
|
+
*/
|
|
262
|
+
type?: JSONSchema7TypeName | JSONSchema7TypeName[] | undefined;
|
|
263
|
+
enum?: JSONSchema7Type[] | undefined;
|
|
264
|
+
const?: JSONSchema7Type | undefined;
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.2
|
|
268
|
+
*/
|
|
269
|
+
multipleOf?: number | undefined;
|
|
270
|
+
maximum?: number | undefined;
|
|
271
|
+
exclusiveMaximum?: number | undefined;
|
|
272
|
+
minimum?: number | undefined;
|
|
273
|
+
exclusiveMinimum?: number | undefined;
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.3
|
|
277
|
+
*/
|
|
278
|
+
maxLength?: number | undefined;
|
|
279
|
+
minLength?: number | undefined;
|
|
280
|
+
pattern?: string | undefined;
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.4
|
|
284
|
+
*/
|
|
285
|
+
items?:
|
|
286
|
+
| SimpleAppJSONSchema7Definition
|
|
287
|
+
| SimpleAppJSONSchema7Definition[]
|
|
288
|
+
| undefined;
|
|
289
|
+
additionalItems?: JSONSchema7Definition | undefined;
|
|
290
|
+
maxItems?: number | undefined;
|
|
291
|
+
minItems?: number | undefined;
|
|
292
|
+
uniqueItems?: boolean | undefined;
|
|
293
|
+
contains?: SimpleAppJSONSchema7Definition | undefined;
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.5
|
|
297
|
+
*/
|
|
298
|
+
maxProperties?: number | undefined;
|
|
299
|
+
minProperties?: number | undefined;
|
|
300
|
+
required?: string[] | undefined;
|
|
301
|
+
properties?:
|
|
302
|
+
| {
|
|
249
303
|
[key: string]: SimpleAppJSONSchema7Definition;
|
|
250
|
-
|
|
251
|
-
|
|
304
|
+
}
|
|
305
|
+
| undefined;
|
|
306
|
+
patternProperties?:
|
|
307
|
+
| {
|
|
252
308
|
[key: string]: SimpleAppJSONSchema7Definition;
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
309
|
+
}
|
|
310
|
+
| undefined;
|
|
311
|
+
additionalProperties?: SimpleAppJSONSchema7Definition | undefined;
|
|
312
|
+
dependencies?:
|
|
313
|
+
| {
|
|
256
314
|
[key: string]: SimpleAppJSONSchema7Definition | string[];
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
315
|
+
}
|
|
316
|
+
| undefined;
|
|
317
|
+
propertyNames?: SimpleAppJSONSchema7Definition | undefined;
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.6
|
|
321
|
+
*/
|
|
322
|
+
if?: SimpleAppJSONSchema7Definition | undefined;
|
|
323
|
+
then?: SimpleAppJSONSchema7Definition | undefined;
|
|
324
|
+
else?: SimpleAppJSONSchema7Definition | undefined;
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.7
|
|
328
|
+
*/
|
|
329
|
+
allOf?: SimpleAppJSONSchema7Definition[] | undefined;
|
|
330
|
+
anyOf?: SimpleAppJSONSchema7Definition[] | undefined;
|
|
331
|
+
oneOf?: SimpleAppJSONSchema7Definition[] | undefined;
|
|
332
|
+
not?: SimpleAppJSONSchema7Definition | undefined;
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-7
|
|
336
|
+
*/
|
|
337
|
+
format?: string | undefined;
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-8
|
|
341
|
+
*/
|
|
342
|
+
contentMediaType?: string | undefined;
|
|
343
|
+
contentEncoding?: string | undefined;
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-9
|
|
347
|
+
*/
|
|
348
|
+
definitions?:
|
|
349
|
+
| {
|
|
290
350
|
[key: string]: JSONSchema7Definition;
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
351
|
+
}
|
|
352
|
+
| undefined;
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-10
|
|
356
|
+
*/
|
|
357
|
+
title?: string | undefined;
|
|
358
|
+
description?: string | undefined;
|
|
359
|
+
default?: JSONSchema7Type | undefined;
|
|
360
|
+
readOnly?: boolean | undefined;
|
|
361
|
+
writeOnly?: boolean | undefined;
|
|
362
|
+
examples?: JSONSchema7Type | undefined;
|
|
363
|
+
}
|