[OpenAPI] Implemented example as per example wiki page for getting anchors based...
[cps.git] / cps-rest / docs / openapi / components.yml
1 components:
2   schemas:
3
4     AnchorDetails:
5       type: object
6       title: Anchor details by anchor Name
7       properties:
8         name:
9           type: string
10           example: my_anchor
11         dataspaceName:
12           type: string
13           example: my_dataspace
14         schemaSetName:
15           type: string
16           example: my_schema_set
17
18     ErrorMessage:
19       type: object
20       title: Error
21       properties:
22         status:
23           type: string
24           example: 400
25         message:
26           type: string
27           example: Dataspace not found
28         details:
29           type: string
30           example: Dataspace with name D1 does not exist.
31
32     MultipartFile:
33       required:
34         - file
35       properties:
36         multipartFile:
37           type: string
38           description: multipartFile
39           format: binary
40           example: http://example.com/examples/example.yang
41
42     ModuleReferences:
43       type: object
44       title: Module reference object
45       properties:
46         name:
47           type: string
48           example: module_reference_name
49         namespace:
50           type: string
51           example: module_reference_namespace
52         revision:
53           type: string
54           example: module_reference_revision
55
56     SchemaSetDetails:
57       type: object
58       title: Schema set details by dataspace and schemasetName
59       properties:
60         dataspaceName:
61           type: string
62           example: my_dataspace
63         moduleReferences:
64           type: array
65           items:
66             $ref: '#/components/schemas/ModuleReferences'
67         name:
68           type: string
69           example: my_schema_set
70
71   parameters:
72     dataspaceNameInQuery:
73       name: dataspace-name
74       in: query
75       description: dataspace-name
76       required: true
77       schema:
78         type: string
79     dataspaceNameInPath:
80       name: dataspace-name
81       in: path
82       description: dataspace-name
83       required: true
84       schema:
85         type: string
86     anchorNameInPath:
87       name: anchor-name
88       in: path
89       description: anchor-name
90       required: true
91       schema:
92         type: string
93     schemaSetNameInQuery:
94       name: schema-set-name
95       in: query
96       description: schema-set-name
97       required: true
98       schema:
99         type: string
100     schemaSetNameInPath:
101       name: schema-set-name
102       in: path
103       description: schema-set-name
104       required: true
105       schema:
106         type: string
107     anchorNameInQuery:
108       name: anchor-name
109       in: query
110       description: anchor-name
111       required: true
112       schema:
113         type: string
114     xpathInQuery:
115       name: xpath
116       in: query
117       description: xpath
118       required: false
119       schema:
120         type: string
121         default: /
122     requiredXpathInQuery:
123       name: xpath
124       in: query
125       description: xpath
126       required: true
127       schema:
128         type: string
129     cpsPathInQuery:
130       name: cps-path
131       in: query
132       description: cps-path
133       required: false
134       schema:
135         type: string
136         default: /
137     includeDescendantsOptionInQuery:
138       name: include-descendants
139       in: query
140       description: include-descendants
141       required: false
142       schema:
143         type: boolean
144         default: false
145
146   responses:
147     NotFound:
148       description: The specified resource was not found
149       content:
150         application/json:
151           schema:
152             $ref: '#/components/schemas/ErrorMessage'
153     Unauthorized:
154       description: Unauthorized
155       content:
156         application/json:
157           schema:
158             $ref: '#/components/schemas/ErrorMessage'
159     Forbidden:
160       description: Forbidden
161       content:
162         application/json:
163           schema:
164             $ref: '#/components/schemas/ErrorMessage'
165     BadRequest:
166       description: Bad Request
167       content:
168         application/json:
169           schema:
170             $ref: '#/components/schemas/ErrorMessage'
171     Conflict:
172       description: Conflict
173       content:
174         application/json:
175           schema:
176             $ref: '#/components/schemas/ErrorMessage'
177     Ok:
178       description: OK
179       content:
180         application/json:
181           schema:
182             type: object
183     Created:
184       description: Created
185       content:
186         text/plain:
187           schema:
188             type: string
189     NoContent:
190       description: No Content
191       content: {}