forked from jdiazgon/ExternalProcessCobiGen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Specification.yml
291 lines (289 loc) · 8.44 KB
/
Specification.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
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
249
250
251
252
253
254
255
256
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
290
291
openapi: 3.0.0
servers:
- url: 'https://localhost:5000/'
description: Nodejs server
info:
title: External process communication
description: Specification of communication between external process and CobiGen
version: 1.0.0
x-rootpackage: com.devonfw.poc
paths:
/processmanagement/inputReader/isValidInput/:
post:
description: Returns true or false whether it is a valid input for generation
requestBody:
$ref: '#/components/requestBodies/File'
operationId: isValidInput
responses:
'200':
description: Returns true or false whether it is a valid input for generation
content:
application/json:
schema:
type: object
properties:
isValidInput:
type: boolean
'404':
description: Not found
/processmanagement/inputReader/createModel/:
post:
requestBody:
$ref: '#/components/requestBodies/File'
operationId: createModel
responses:
'200':
description: Returns data model in JSON format
content:
application/json:
schema:
$ref: '#/components/schemas/Model'
'404':
description: Not found
/processmanagement/inputReader/getInputObjects/:
post:
description: Requesting models for each input object found at the input file
requestBody:
$ref: '#/components/requestBodies/File'
operationId: getInputObjects
responses:
'200':
description: Returns array of models in JSON format
content:
application/json:
schema:
$ref: '#/components/schemas/Models'
'404':
description: Not found
/processmanagement/inputReader/getInputObjectsRecursively/:
post:
description: Requesting models for each input object found at the input file (recursively)
requestBody:
$ref: '#/components/requestBodies/File'
operationId: getInputObjectsRecursively
responses:
'200':
description: Returns array of models in JSON format
content:
application/json:
schema:
$ref: '#/components/schemas/Models'
'404':
description: Not found
/processmanagement/inputReader/read/:
post:
description: Returns a valid input for CobiGen in JSON format
requestBody:
$ref: '#/components/requestBodies/File'
operationId: read
responses:
'200':
description: Returns a valid input for CobiGen in JSON format
content:
application/json:
schema:
$ref: '#/components/schemas/Model'
'404':
description: Not found
/processmanagement/matcher/matches/:
post:
description: Checks whether the given matcher matches the sent input
requestBody:
$ref: '#/components/requestBodies/Matcher'
operationId: matches
responses:
'200':
description: Returns true or false whether it matches
content:
application/json:
schema:
type: object
properties:
matches:
type: boolean
'404':
description: Not found
/processmanagement/matcher/resolveVariables/:
post:
description: resolve all given variable assignments
requestBody:
$ref: '#/components/requestBodies/File'
operationId: resolveVariables
responses:
'200':
description: Returns resolved variables
content:
application/json:
schema:
type: object
properties:
isValidInput:
type: boolean
'404':
description: Not found
/processmanagement/merger/merge/:
post:
description: Merges two files and returns the result
requestBody:
$ref: '#/components/requestBodies/Merger'
operationId: merge
responses:
'200':
description: Returns resolved variables
content:
text/plain:
schema:
type: string
'404':
description: Not found
components:
schemas:
Models:
x-component: processmanagement
description: Array of models
type: array
items:
type: object
properties:
Field:
$ref: '#/components/schemas/Model'
Model:
x-component: processmanagement
description: Data model of the input file
type: object
properties:
fileType:
type: string
maxLength: 30
minLength: 1
uniqueItems: true
fileName:
type: string
maxLength: 30
minLength: 1
uniqueItems: true
Fields:
$ref: '#/components/schemas/Fields'
Imports:
$ref: '#/components/schemas/Imports'
Fields:
x-component: processmanagement
description: Array of fields
type: array
items:
type: object
properties:
Field:
$ref: '#/components/schemas/Field'
Field:
x-component: processmanagement
description: Field
type: object
properties:
fieldName:
type: string
fieldType:
type: string
Imports:
x-component: processmanagement
description: Array of imports
type: array
items:
type: object
properties:
Import:
$ref: '#/components/schemas/Import'
Import:
x-component: processmanagement
description: Field
type: object
properties:
importValue:
type: string
File:
x-component: processmanagement
description: Input file
type: object
properties:
filePath:
type: string
Matcher:
x-component: processmanagement
description: Matcher properties
type: object
properties:
inputToMatch:
type: object
type:
type: string
value:
type: string
accumulationType:
type: string
VariableAssignment:
x-component: processmanagement
description: Matcher properties
type: object
properties:
inputToResolve:
type: string
type:
type: string
key:
type: string
value:
type: string
Merger:
x-component: processmanagement
description: Merger properties
type: object
properties:
basePath:
type: string
patchPath:
type: string
targetCharset:
type: string
requestBodies:
Model:
description: Data model of the file in JSON format
content:
application/json:
schema:
$ref: '#/components/schemas/Model'
required: true
Models:
description: Array of models (JSON format)
content:
application/json:
schema:
$ref: '#/components/schemas/Models'
required: true
File:
description: Input file path
content:
application/json:
schema:
$ref: '#/components/schemas/File'
required: true
Matcher:
description: Matcher properties
content:
application/json:
schema:
$ref: '#/components/schemas/Matcher'
required: true
VariableAssignment:
description: Variable assignment properties
content:
application/json:
schema:
$ref: '#/components/schemas/VariableAssignment'
required: true
Merger:
description: Objects to be merged
content:
application/json:
schema:
$ref: '#/components/schemas/Merger'
required: true