Skip to content

Commit 7016392

Browse files
committed
Add isInsurance endpoint
1 parent d081be3 commit 7016392

File tree

1 file changed

+69
-51
lines changed

1 file changed

+69
-51
lines changed

src/openapi/TiMessengerInformation.yaml

Lines changed: 69 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,11 @@ openapi: 3.0.3
22
info:
33
title: I_TiMessengerInformation
44
description: |
5-
# Overview
6-
This is a TI-Messenger REST interface that provides Informations for TI-Messenger Clients.
7-
# Context
8-
## Authentication
9-
The TI-Messenger-Client uses a Matrix-OpenID-Token from his Messenger-Service for
10-
authentication on all REST operations. The bearer token can be obtained from the
11-
homeserver. (POST /_matrix/client/v3/user/{userId}/openid/request_token).
12-
TI-Messenger-Client ---> Messenger-Proxy ---> Homeserver
13-
## REST operations
14-
The interface provides read informations for a TI-Messenger-Client
15-
TI-Messenger-Client ---> Messenger-Proxy
5+
This is a REST interface that provides information to TI-Messenger clients.
166
17-
# Information
7+
The client uses a Matrix-OpenID-Token for authentication on all REST
8+
operations. The bearer token can be obtained from the homeserver via
9+
POST /_matrix/client/v3/user/{userId}/openid/request_token).
1810
version: 1.0.0
1911
### 1.0.0
2012
# - initial version
@@ -31,74 +23,102 @@ externalDocs:
3123
url: https://github.com/gematik/api-ti-messenger
3224

3325
servers:
34-
- url: https://{serverDomain}/tim-information
26+
- url: https://{server}/tim-information
3527
variables:
36-
serverDomain:
37-
description: The domain of the server
28+
server:
29+
description: "The server hosting this interface."
3830
default: tobereplaced.de
31+
3932
tags:
4033
- name: info
41-
description: This operation returns meta data about this interface and the status of available resources
42-
- name: lookUpDomain
43-
description: Operations for domain lookup
34+
description: "Information about this interface itself."
35+
- name: lookUpServer
36+
description: "Operations for server lookup."
4437

4538
paths:
4639
/:
4740
get:
4841
tags:
4942
- info
50-
summary: "Get information about the interface"
51-
description: Returns the meta data of this interface.
52-
operationId: getInfo
43+
summary: "Retrieve metadata about this interface."
5344
responses:
5445
"200":
55-
description: OK
46+
description: "OK"
5647
content:
5748
application/json:
5849
schema:
5950
$ref: "#/components/schemas/InfoObject"
6051
"403":
6152
$ref: "#/components/responses/Forbidden"
62-
default:
63-
$ref: "#/components/responses/DefaultResponse"
6453

65-
/v1/domain/findByIk:
66-
parameters:
67-
- in: query
68-
name: ikNumber
69-
description: "IK number to lookup the domain for."
70-
required: true
71-
schema:
72-
type: string
54+
/v1/server/findByIk:
7355
get:
7456
tags:
75-
- lookUpDomain
76-
summary: "Find domain by IK number"
77-
description: "Returns the domain that hosts users which belong to the given IK number."
78-
operationId: getDomain
57+
- lookUpServer
58+
summary: "Resolve an IK number to the associated TI-Messenger server name."
59+
parameters:
60+
- in: query
61+
name: ikNumber
62+
description: "IK number to look up."
63+
required: true
64+
schema:
65+
type: string
7966
responses:
8067
"200":
81-
description: "The domain hosting users for the given ik number."
68+
description: "OK"
8269
content:
8370
application/json:
8471
schema:
85-
type: string
86-
description: "the domain for the given ik number"
87-
example: "gematiker-kk.de"
72+
type: object
73+
required:
74+
- serverName
75+
properties:
76+
serverName:
77+
type: string
78+
description: "The TI-Messenger server name for the given IK number."
79+
example: "gematiker-kk.de"
8880
"400":
8981
$ref: "#/components/responses/BadRequest"
9082
"401":
9183
$ref: "#/components/responses/Unauthorized"
9284
"404":
9385
$ref: "#/components/responses/NotFound"
94-
default:
95-
$ref: "#/components/responses/DefaultResponse"
86+
87+
/v1/server/isInsurance:
88+
get:
89+
tags:
90+
- lookUpServer
91+
summary: "Check whether a TI-Messenger server name represents an insurance."
92+
parameters:
93+
- in: query
94+
name: serverName
95+
description: "The server name to query."
96+
required: true
97+
schema:
98+
type: string
99+
responses:
100+
"200":
101+
description: "OK"
102+
content:
103+
application/json:
104+
schema:
105+
type: object
106+
required:
107+
- isInsurance
108+
properties:
109+
isInsurance:
110+
type: boolean
111+
description: "`true` if the server name represents an insurance or `false` otherwise."
112+
"400":
113+
$ref: "#/components/responses/BadRequest"
114+
"401":
115+
$ref: "#/components/responses/Unauthorized"
96116

97117
# Descriptions of common components
98118
components:
99119
responses:
100120
DefaultResponse:
101-
description: "The default error response"
121+
description: "Default error response."
102122
content:
103123
application/json:
104124
schema:
@@ -126,7 +146,6 @@ components:
126146

127147
schemas:
128148
InfoObject:
129-
description: ""
130149
required:
131150
- title
132151
- version
@@ -135,29 +154,28 @@ components:
135154
properties:
136155
title:
137156
type: string
138-
description: "Der Titel der Anwendung"
157+
description: "The service's title."
139158
example: "Contact Information API des TI-Messengers"
140159
description:
141160
type: string
142-
description: "Short description of the application"
161+
description: "Short description of the service."
143162
example: "Contact Information API des TI-Messengers. Betreiber: <Betreibername>"
144163
contact:
145164
type: string
146-
description: "Kontaktinformationen des Betreibers"
165+
description: "Contact information of the operator."
147166
version:
148167
type: string
149-
description: "Version der implementierten TiMessengerContactInformation.yaml"
168+
description: "Version of the `TiMessengerContactInformation.yaml` interface."
150169
example: "1.0.0"
151170

152171
Error:
153-
description: "Default error object with information about the occurred error"
154172
type: object
155173
properties:
156174
errorCode:
157-
description: "a code identifying this error"
175+
description: "A code identifying this error."
158176
type: string
159177
errorMessage:
160-
description: "a readable message describing the error"
178+
description: "A readable message describing the error."
161179
type: string
162180
required:
163181
- errorCode

0 commit comments

Comments
 (0)