Skip to content

Commit 6918bed

Browse files
ichderjensJohennes
andauthored
added information api (#253)
* added information api * Update src/openapi/TiMessengerInformation.yaml Co-authored-by: Johannes Marbach <[email protected]> * Update src/openapi/TiMessengerInformation.yaml Co-authored-by: Johannes Marbach <[email protected]> * Update src/openapi/TiMessengerInformation.yaml Co-authored-by: Johannes Marbach <[email protected]> * removed version from server url and added versioning for domain search --------- Co-authored-by: Johannes Marbach <[email protected]>
1 parent 535344b commit 6918bed

File tree

1 file changed

+28
-23
lines changed

1 file changed

+28
-23
lines changed

src/openapi/TiMessengerInformation.yaml

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@ info:
33
title: I_TiMessengerInformation
44
description: |
55
# Overview
6-
This is a TI-Messenger REST interface that provides Informations for the TI-Messenger Client.
6+
This is a TI-Messenger REST interface that provides Informations for TI-Messenger Clients.
77
# Context
88
## Authentication
99
The TI-Messenger-Client uses a Matrix-OpenID-Token from his Messenger-Service for
1010
authentication on all REST operations. The bearer token can be obtained from the
11-
homeserver. (POST /_matrix/client/r0/user/{userId}/openid/request_token).
12-
13-
11+
homeserver. (POST /_matrix/client/v3/user/{userId}/openid/request_token).
1412
TI-Messenger-Client ---> Messenger-Proxy ---> Homeserver
1513
## REST operations
1614
The interface provides read informations for a TI-Messenger-Client
@@ -33,18 +31,23 @@ externalDocs:
3331
url: https://github.com/gematik/api-ti-messenger
3432

3533
servers:
36-
- url: https://localhost/tim-information/v1.0.0/
34+
- url: https://{serverDomain}/tim-information
35+
variables:
36+
serverDomain:
37+
description: The domain of the server
38+
default: tobereplaced.de
3739
tags:
3840
- name: info
3941
description: This operation returns meta data about this interface and the status of available resources
40-
- name: contacts
41-
description: Operations for contact management
42+
- name: lookUpDomain
43+
description: Operations for domain lookup
4244

4345
paths:
4446
/:
4547
get:
4648
tags:
4749
- info
50+
summary: "Get information about the interface"
4851
description: Returns the meta data of this interface.
4952
operationId: getInfo
5053
responses:
@@ -59,18 +62,19 @@ paths:
5962
default:
6063
$ref: "#/components/responses/DefaultResponse"
6164

62-
/domain/findByIk:
65+
/v1/domain/findByIk:
6366
parameters:
64-
- in: query
65-
name: iknumber
66-
description: "IK number to lookup the domain for."
67-
required: true
68-
schema:
69-
type: string
67+
- in: query
68+
name: ikNumber
69+
description: "IK number to lookup the domain for."
70+
required: true
71+
schema:
72+
type: string
7073
get:
7174
tags:
7275
- lookUpDomain
73-
description: "Returns the domain that hosts user which belong to the given ik number."
76+
summary: "Find domain by IK number"
77+
description: "Returns the domain that hosts users which belong to the given IK number."
7478
operationId: getDomain
7579
responses:
7680
"200":
@@ -83,6 +87,8 @@ paths:
8387
example: "gematiker-kk.de"
8488
"400":
8589
$ref: "#/components/responses/BadRequest"
90+
"401":
91+
$ref: "#/components/responses/Unauthorized"
8692
"404":
8793
$ref: "#/components/responses/NotFound"
8894
default:
@@ -119,7 +125,6 @@ components:
119125
$ref: "#/components/schemas/Error"
120126

121127
schemas:
122-
123128
InfoObject:
124129
description: ""
125130
required:
@@ -131,17 +136,17 @@ components:
131136
title:
132137
type: string
133138
description: "Der Titel der Anwendung"
134-
example: "Contact Management des TI-Messengers"
139+
example: "Contact Information API des TI-Messengers"
135140
description:
136141
type: string
137142
description: "Short description of the application"
138-
example: "Contact Management des TI-Messengers. Betreiber: <Betreibername>"
143+
example: "Contact Information API des TI-Messengers. Betreiber: <Betreibername>"
139144
contact:
140145
type: string
141-
description: "Contact information"
146+
description: "Kontaktinformationen des Betreibers"
142147
version:
143148
type: string
144-
description: "Version der implementierten TiMessengerContactManagement.yaml Schnittstelle (Version der TiMessengerContactManagement.yaml Datei)"
149+
description: "Version der implementierten TiMessengerContactInformation.yaml"
145150
example: "1.0.0"
146151

147152
Error:
@@ -159,11 +164,11 @@ components:
159164
- errorMessage
160165

161166
securitySchemes:
162-
bearerMatrixOpenIdTokenAuth: # arbitrary name for the security scheme
167+
bearerMatrixOpenIdTokenAuth: # arbitrary name for the security scheme
163168
type: http
164169
scheme: bearer
165-
bearerFormat: JWT # optional, arbitrary value for documentation purposes
170+
bearerFormat: JWT # optional, arbitrary value for documentation purposes
166171

167172
# the security applies to all operations
168173
security:
169-
- bearerMatrixOpenIdTokenAuth: [] # use the same name as above
174+
- bearerMatrixOpenIdTokenAuth: [] # use the same name as above

0 commit comments

Comments
 (0)