-
Notifications
You must be signed in to change notification settings - Fork 9
/
TiMessengerInformation.yaml
186 lines (174 loc) · 5.15 KB
/
TiMessengerInformation.yaml
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
openapi: 3.0.3
info:
title: I_TiMessengerInformation
description: |
This is a REST interface that provides information to TI-Messenger clients.
The client uses a Matrix-OpenID-Token for authentication on all REST
operations. The bearer token can be obtained from the homeserver via
POST /_matrix/client/v3/user/{userId}/openid/request_token).
version: 1.0.0
### 1.0.0
# - initial version
contact:
name: gematik GmbH
email: [email protected]
url: "https://www.gematik.de"
license:
name: Apache 2.0
url: "https://www.apache.org/licenses/LICENSE-2.0"
externalDocs:
description: TI-Messenger-API
url: https://github.com/gematik/api-ti-messenger
servers:
- url: https://{server}/tim-information
variables:
server:
description: "The server hosting this interface."
default: tobereplaced.de
tags:
- name: info
description: "Information about this interface itself."
- name: lookUpServer
description: "Operations for server lookup."
paths:
/:
get:
tags:
- info
summary: "Retrieve metadata about this interface."
responses:
"200":
description: "OK"
content:
application/json:
schema:
$ref: "#/components/schemas/InfoObject"
"403":
$ref: "#/components/responses/Forbidden"
/v1/server/findByIk:
get:
tags:
- lookUpServer
summary: "Resolve an IK number to the associated TI-Messenger server name."
parameters:
- in: query
name: ikNumber
description: "IK number to look up."
required: true
schema:
type: string
responses:
"200":
description: "OK"
content:
application/json:
schema:
type: object
required:
- serverName
properties:
serverName:
type: string
description: "The TI-Messenger server name for the given IK number."
example: "gematiker-kk.de"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
"404":
$ref: "#/components/responses/NotFound"
/v1/server/isInsurance:
get:
tags:
- lookUpServer
summary: "Check whether a TI-Messenger server name represents an insurance."
parameters:
- in: query
name: serverName
description: "The server name to query."
required: true
schema:
type: string
responses:
"200":
description: "OK"
content:
application/json:
schema:
type: object
required:
- isInsurance
properties:
isInsurance:
type: boolean
description: "`true` if the server name represents an insurance or `false` otherwise."
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
# Descriptions of common components
components:
responses:
NotFound:
description: "The specified resource was not found"
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
Unauthorized:
description: "Unauthorized"
Forbidden:
description: "Forbidden - you are not allowed to do this"
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
BadRequest:
description: "Bad Request"
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
schemas:
InfoObject:
required:
- title
- version
readOnly: true
type: object
properties:
title:
type: string
description: "The service's title."
example: "Contact Information API des TI-Messengers"
description:
type: string
description: "Short description of the service."
example: "Contact Information API des TI-Messengers. Betreiber: <Betreibername>"
contact:
type: string
description: "Contact information of the operator."
version:
type: string
description: "Version of the `TiMessengerContactInformation.yaml` interface."
example: "1.0.0"
Error:
type: object
properties:
errorCode:
description: "A code identifying this error."
type: string
errorMessage:
description: "A readable message describing the error."
type: string
required:
- errorCode
- errorMessage
securitySchemes:
bearerMatrixOpenIdTokenAuth: # arbitrary name for the security scheme
type: http
scheme: bearer
bearerFormat: JWT # optional, arbitrary value for documentation purposes
# the security applies to all operations
security:
- bearerMatrixOpenIdTokenAuth: [] # use the same name as above