aboutsummaryrefslogtreecommitdiffstats
path: root/openapi/src/main/resources/api/api.yml
blob: db599b11439df2ce60ea46b79aa077e8124a439c (plain)
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
openapi: 3.0.2
info:
  title: Config API
  version: '1.0'
servers:
  - url: 'http://localhost:9001/'
paths:
  /v1/preferences:
    get:
      description: Returns user preferences
      summary: Get user preferences
      operationId: getPreferences
      parameters:
        - $ref: '#/components/parameters/XRequestIdHeader'
      tags:
        - preferences
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Preferences'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '502':
          $ref: '#/components/responses/BadGateway'
    put:
      description: Updates user preferences
      summary: Update user preferences
      operationId: updatePreferences
      parameters:
        - $ref: '#/components/parameters/XRequestIdHeader'
      tags:
        - preferences
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Preferences'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Preferences'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '502':
          $ref: '#/components/responses/BadGateway'
    post:
      description: Save user preferences
      summary: Save user preferences
      operationId: savePreferences
      parameters:
        - $ref: '#/components/parameters/XRequestIdHeader'
      tags:
        - preferences
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Preferences'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Preferences'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '502':
          $ref: '#/components/responses/BadGateway'
components:
  parameters:
    XRequestIdHeader:
      name: X-Request-Id
      in: header
      description: The unique identifier of the request
      required: true
      schema:
        type: string
  schemas:
    Preferences:
      type: object
      properties:
        properties:
          type: object
      required:
        - properties
    Problem:
      type: object
      properties:
        type:
          type: string
          format: uri-reference
          description: |
            A URI reference that uniquely identifies the problem type only in the context of the provided API. Opposed to the specification in RFC-7807, it is neither recommended to be dereferencable and point to a human-readable documentation nor globally unique for the problem type.
          default: 'about:blank'
          example: /problem/connection-error
        title:
          type: string
          description: |
            A short summary of the problem type. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized.
          example: Service Unavailable
        status:
          type: integer
          format: int32
          description: |
            The HTTP status code generated by the origin server for this occurrence of the problem.
          minimum: 100
          maximum: 600
          exclusiveMaximum: true
          example: 503
        detail:
          type: string
          description: |
            A human readable explanation specific to this occurrence of the problem that is helpful to locate the problem and give advice on how to proceed. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized.
          example: Connection to database timed out
        instance:
          type: string
          format: uri-reference
          description: |
            A URI reference that identifies the specific occurrence of the problem, e.g. by adding a fragment identifier or sub-path to the problem type. May be used to locate the root of this problem in the source code.
          example: /problem/connection-error#token-info-read-timed-out
  responses:
    BadRequest:
      description: '400: Bad Request'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
      headers:
        X-Request-Id:
          schema:
            type: string
          description: A <uuid4> in each response
    Unauthorized:
      description: '401: Unauthorized'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
      headers:
        X-Request-Id:
          schema:
            type: string
          description: A <uuid4> in each response
    Forbidden:
      description: '403: Forbidden'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
      headers:
        X-Request-Id:
          schema:
            type: string
          description: A <uuid4> in each response
    NotFound:
      description: '404: Not Found'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
      headers:
        X-Request-Id:
          schema:
            type: string
          description: A <uuid4> in each response
    NotAllowed:
      description: '405: Method Not Allowed'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
      headers:
        X-Request-Id:
          schema:
            type: string
          description: A <uuid4> in each response
    Conflict:
      description: '409: Conflict'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
      headers:
        X-Request-Id:
          schema:
            type: string
          description: A <uuid4> in each response
    InternalServerError:
      description: Internal Server Error
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
      headers:
        X-Request-Id:
          schema:
            type: string
          description: A <uuid4> in each response
    BadGateway:
      description: Bad Gateway
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
      headers:
        X-Request-Id:
          schema:
            type: string
          description: A <uuid4> in each response