-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathseed-xc-openapi.yaml
More file actions
558 lines (548 loc) · 17.9 KB
/
seed-xc-openapi.yaml
File metadata and controls
558 lines (548 loc) · 17.9 KB
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
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
openapi: 3.1.0
info:
title: SEED XC
description: SEED XC is an API for compiling XSLT stylesheets and packages
version: 1.0.0
tags:
- name: transformer
description: A Transformer API offers transformations user input
- name: compiler
description: A Compiler API offers operations for compiling user input
paths:
/transformations:
get:
tags:
- transformer
operationId: transformationsGet
summary: Get IDs of all transformations available on this service
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/transformationIDs'
"5XX":
description: Unexpected error.
/transformations/{transformation}/info:
get:
tags:
- transformer
operationId: transformationsTransformationInfoGet
summary: Get info for transformation with the ID
parameters:
- name: transformation
in: path
description: The ID of the transformation
required: true
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/transformationInfo'
"400":
$ref: '#/components/responses/BadRequest'
"404":
$ref: '#/components/responses/NotFound'
"500":
$ref: '#/components/responses/InternalError'
/transformations/{transformation}/parameters:
get:
tags:
- transformer
operationId: transformationsTransformationParametersGet
summary: Get a compiler-generated description of the global parameters of this transformation.
parameters:
- name: transformation
in: path
description: The ID of the transformation
required: true
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/xsltParameterDetails'
"400":
$ref: '#/components/responses/BadRequest'
"404":
$ref: '#/components/responses/NotFound'
"500":
$ref: '#/components/responses/InternalError'
/transform/{transformation}/{url}:
post:
tags:
- transformer
operationId: transformTransformationUrlPost
summary: Transform the XML document from the specified URL. Runtime parameters are provided in the request body.
parameters:
- name: transformation
in: path
description: The ID of the transformation
required: true
schema:
type: string
- name: url
in: path
description: The URL of the source document to be transformed
required: true
schema:
type: string
requestBody:
description: The input to the transformation
required: false
content:
multipart/form-data:
schema:
type: object
properties:
runtimeParameters:
$ref: '#/components/schemas/runtimeParameters'
config:
$ref: '#/components/schemas/config'
encoding:
runtimeParameters:
contentType: application/json
config:
contentType: application/json
responses:
"200":
$ref: '#/components/responses/TransformationOK'
"400":
$ref: '#/components/responses/BadRequest'
"404":
$ref: '#/components/responses/NotFound'
"500":
$ref: '#/components/responses/InternalError'
get:
tags:
- transformer
operationId: transformTransformationUrlGet
summary: Transform the XML document from the specified URL. No runtime parameters can be provided.
parameters:
- name: transformation
in: path
description: The ID of the transformation
required: true
schema:
type: string
- name: url
in: path
description: The URL of the source document to be transformed
required: true
schema:
type: string
responses:
"200":
$ref: '#/components/responses/TransformationOK'
"400":
$ref: '#/components/responses/BadRequest'
"404":
$ref: '#/components/responses/NotFound'
"500":
$ref: '#/components/responses/InternalError'
/transform/{transformation}:
post:
tags:
- transformer
operationId: transformTransformationPost
summary: Transform the XML document posted in the request body. Its URL and the runtime parameters are also provided in the request body.
parameters:
- name: transformation
in: path
description: The ID of the transformation
required: true
schema:
type: string
requestBody:
description: The input to the transformation
required: false
content:
multipart/form-data:
schema:
type: object
properties:
source:
description: The source document
type: string
format: binary
sourceUrl:
description: URL of the source document
type: string
runtimeParameters:
$ref: '#/components/schemas/runtimeParameters'
config:
$ref: '#/components/schemas/config'
required:
- source
encoding:
source:
contentType: application/xml, text/xml, application/atom+xml, application/svg+xml, application/xhtml+xml
responses:
"200":
$ref: '#/components/responses/TransformationOK'
"400":
$ref: '#/components/responses/BadRequest'
"404":
$ref: '#/components/responses/NotFound'
"500":
$ref: '#/components/responses/InternalError'
/xslc/zip/{stylesheet}:
post:
tags:
- compiler
operationId: compileZip
summary: Compiles the stylesheet contained in the posted zip and stores it under the given transformation ID.
parameters:
- name: stylesheet
in: path
description: The filename of the XSLT stylesheet or package to be compiled
required: true
schema:
type: string
requestBody:
description: A zip file containing the XSLT stylesheets, packages, imports, and other static resources required for the compilation
required: true
content:
application/zip:
schema:
type: string
format: local-zip
responses:
"200":
$ref: '#/components/responses/CompilationSuccessful'
"400":
$ref: '#/components/responses/StylesheetNotFound'
"401":
description: Unauthorized
"5XX":
$ref: '#/components/responses/CompilationError'
/bind/{transformationResource}/{transformationId}:
get:
tags:
- compiler
operationId: bind
summary: Binds the transformation resource to the transformation ID. A server without transformation capability SHOULD respond with 501.
parameters:
- name: transformationResource
in: path
description: The resource identifier (significant part of the transformation resource link)
required: true
schema:
type: string
- name: transformationId
in: path
description: The ID to which the transformation with the resource identifier is to be bound to
required: true
schema:
type: string
responses:
"200":
description: OK
"400":
description: Bad Request - Transformation ID syntax error
"401":
description: Unauthorized
"404":
description: Not Found - No such transformation resource
"501":
description: Not Implemented
"5XX":
description: Unexpected Error
components:
responses:
CompilationSuccessful:
description: OK
content:
application/json:
schema:
type: object
headers:
transformation-resource-link:
description: A link to the resource which runs the transformation.
schema:
type: string
format: uri
transformation-resource:
description: The significant part of the transformation resource link that identifies the transformation
schema:
type: string
StylesheetNotFound:
description: Bad Request
content:
text/plain:
schema:
type: string
CompilationError:
description: Compilation Error
content:
text/plain:
schema:
type: string
TransformationOK:
description: OK
content:
"*/*":
schema:
type: string
format: binary
NotFound:
description: The specified resource was not found
BadRequest:
description: Bad request.
content:
text/plain:
schema:
type: string
format: binary
InternalError:
description: An error occurred while performing the transformation.
content:
text/plain:
schema:
type: string
format: binary
schemas:
parser:
description: How to parse the main input.
type: object
properties:
class:
description: Java name of the parser.
type: string
xinclude:
description: Whether or to parse the source xinclude-aware.
type: boolean
serializer:
description: How to serialize the output.
type: object
properties:
class:
description: Java name of the serializer.
type: string
method:
description: Serialization method, e.g. `xml`, `text`, `json`.
type: string
indent:
description: Whether or not the output is to be indented.
type: boolean
config:
description: Configuration for the transformation request.
type: object
properties:
parser:
$ref: '#/components/schemas/parser'
serializer:
$ref: '#/components/schemas/serializer'
runtimeParameters:
description: How the transformation is to be called, with a set of global parameters and optionally the initial callable (template or function) and the parameters for it.
type: object
properties:
globalParameters:
description: Global parameters passed to the transformation (stylesheet parameters).
type: object
additionalProperties:
$ref: '#/components/schemas/parameterValue'
initialCall:
description: The resource to call initially for the transformation.
type: object
additionalProperties:
type: object
properties:
name:
description: QName of the initial resource to call.
type: string
type:
description: The type of the initially called resource, e.g. a template or a function.
type: string
enum:
- function
- template
parameters:
description: Parameters to be passed to the initially called resource.
type: object
additionalProperties:
$ref: '#/components/schemas/parameterValue'
tunnelParameters:
description: QNames of the parameters that are tunnel parameters
type: array
items:
type: string
required:
- name
- type
source:
description: URL of the XML source document to transform
type: string
transformationIDs:
type: array
items:
type: string
transformationId:
description: ID of the transformation
type: string
parameterValue:
description: A parameter value
type: string
typedParameter:
description: A parameter value
type: object
required:
- name
- value
properties:
name:
type: string
description: The parameter name.
value:
type: string
description: The parameter value.
type:
type: string
description: The local name of the parameter type. Write 'integer' instead of 'xs:integer'!
context:
description: Options of the JSON-LD context
type: object
required:
- location
properties:
location:
type: string
format: uri
description: The URI of the initial active context
transformationInfo:
description: Information about the transformation resource and its runtime parameters
type: object
properties:
ident:
description: Identifier of the transformation.
type: string
class:
description: The Java class of the transformation. This is evaluated by the service to create the transformation.
type: string
description:
description: A human readable description of the transformation.
type: string
requiresSource:
description: Whether or not the transformation requires a source document.
type: boolean
location:
description: URL where the transformation resource is located.
type: string
mediaType:
description: Mime-type of the transformed document.
type: string
compileTimeParameters:
description: Static parameters passed at compile time.
type: array
items:
$ref: '#/components/schemas/typedParameter'
libraries:
description: Library packages included by the transformation resource (by xsl:use-package). They must be provided in compilation order!
type: array
items:
type: object
properties:
location:
description: URL where the package is located.
type: string
asName:
description: A package name used instead of the one in the source code.
type: string
asVersion:
description: A package version used instead of the one in the source code.
type: string
required:
- location
parameterDescriptors:
description: Descriptors of global parameters of the transformation.
type: object
additionalProperties:
$ref: '#/components/schemas/parameterDescriptor'
initialCallables:
description: Initial templates or functions with description
type: object
additionalProperties:
type: object
properties:
type:
description: The type of callable
type: string
enum:
- template
- function
description:
description: Human readable description of what the transformation does on starting when this is called.
type: string
parameters:
description: Descriptors of parameters.
type: object
additionalProperties:
$ref: '#/components/schemas/parameterDescriptor'
parser:
$ref: '#/components/schemas/parser'
serializer:
$ref: '#/components/schemas/serializer'
context:
$ref: '#/components/schemas/context'
required:
- class
- description
- location
- requiresSource
parameterDescriptor:
description: A description of the transformation parameter.
type: object
properties:
description:
description: A human readable description of the parameter.
type: string
type:
description: The data type of parameter values. Uses xs:*.
type: string
default:
description: Default value of this parameter.
type: string
required:
description: Whether or not the parameter is required.
type: boolean
static:
description: Whether this is a static parameter, i.e. a compile time parameter.
type: boolean
required:
- required
- static
transformationMap:
description: A mapping of transformation IDs to transformation information. This is used to configure the service.
type: object
additionalProperties:
$ref: '#/components/schemas/transformationInfo'
xsltParameterDetails:
description: "A description of parameters produced by the compiler. See [Saxon API](https://www.saxonica.com/documentation10/index.html#!javadoc/net.sf.saxon.s9api/XsltExecutable/ParameterDetails@getDeclaredItemType)"
type: object
additionalProperties:
type: object
properties:
occurrenceIndicator:
description: The declared cardinality of the parameter
type: string
itemType:
description: The declared type of the parameter
type: string
underlyingDeclaredType:
description: The underlying declared type
type: string
isRequired:
description: Whether the parameter is required (mandatory) or optional
type: boolean
error:
description: The error message.
type: string
format: binary