3694f36cd34c1fb6c4f42196de2beaab870b4f25
[cps.git] / cps-rest / docs / api / swagger / components.yml
1 components:
2   schemas:
3     ErrorMessage:
4       type: object
5       title: Error
6       properties:
7         status:
8           type: string
9           example: 400
10         message:
11           type: string
12           example: Dataspace not found
13         details:
14           type: string
15           example: Dataspace with name D1 does not exist.
16
17     MultipartFile:
18       required:
19         - file
20       properties:
21         multipartFile:
22           type: string
23           description: multipartFile
24           format: binary
25           example: http://example.com/examples/example.yang
26
27   parameters:
28     dataspaceNameInQuery:
29       name: dataspace-name
30       in: query
31       description: dataspace-name
32       required: true
33       schema:
34         type: string
35     dataspaceNameInPath:
36       name: dataspace-name
37       in: path
38       description: dataspace-name
39       required: true
40       schema:
41         type: string
42     anchorNameInPath:
43       name: anchor-name
44       in: path
45       description: anchor-name
46       required: true
47       schema:
48         type: string
49     schemaSetNameInQuery:
50       name: schema-set-name
51       in: query
52       description: schema-set-name
53       required: true
54       schema:
55         type: string
56     schemaSetNameInPath:
57       name: schema-set-name
58       in: path
59       description: schema-set-name
60       required: true
61       schema:
62         type: string
63     anchorNameInQuery:
64       name: anchor-name
65       in: query
66       description: anchor-name
67       required: true
68       schema:
69         type: string
70     xpathInQuery:
71       name: xpath
72       in: query
73       description: xpath
74       required: false
75       schema:
76         type: string
77         default: /
78     includeDescendantsOptionInQuery:
79       name: include-descendants
80       in: query
81       description: include-descendants
82       required: false
83       schema:
84         type: boolean
85         default: false
86
87   responses:
88     NotFound:
89       description: The specified resource was not found
90       content:
91         application/json:
92           schema:
93             $ref: '#/components/schemas/ErrorMessage'
94     Unauthorized:
95       description: Unauthorized
96       content:
97         application/json:
98           schema:
99             $ref: '#/components/schemas/ErrorMessage'
100     Forbidden:
101       description: Forbidden
102       content:
103         application/json:
104           schema:
105             $ref: '#/components/schemas/ErrorMessage'
106     BadRequest:
107       description: Bad Request
108       content:
109         application/json:
110           schema:
111             $ref: '#/components/schemas/ErrorMessage'
112     Conflict:
113       description: Conflict
114       content:
115         application/json:
116           schema:
117             $ref: '#/components/schemas/ErrorMessage'
118     Ok:
119       description: OK
120       content:
121         application/json:
122           schema:
123             type: object
124     Created:
125       description: Created
126       content:
127         text/plain:
128           schema:
129             type: string
130     NoContent:
131       description: No Content
132       content: {}