From b0a6d06815c660e1b791a797ff37be3920b3b1c1 Mon Sep 17 00:00:00 2001 From: gem-jn Date: Wed, 7 Aug 2024 17:20:07 +0200 Subject: [PATCH 1/5] added information api --- src/openapi/TiMessengerInformation.yaml | 49 ++++++++++++++----------- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/src/openapi/TiMessengerInformation.yaml b/src/openapi/TiMessengerInformation.yaml index 6639479c..d1d2c09b 100644 --- a/src/openapi/TiMessengerInformation.yaml +++ b/src/openapi/TiMessengerInformation.yaml @@ -3,14 +3,12 @@ info: title: I_TiMessengerInformation description: | # Overview - This is a TI-Messenger REST interface that provides Informations for the TI-Messenger Client. + This is a TI-Messenger REST interface that provides Informations for TI-Messenger Clients. # Context ## Authentication The TI-Messenger-Client uses a Matrix-OpenID-Token from his Messenger-Service for authentication on all REST operations. The bearer token can be obtained from the - homeserver. (POST /_matrix/client/r0/user/{userId}/openid/request_token). - - + homeserver. (POST /_matrix/client/v3/user/{userId}/openid/request_token). TI-Messenger-Client ---> Messenger-Proxy ---> Homeserver ## REST operations The interface provides read informations for a TI-Messenger-Client @@ -33,18 +31,23 @@ externalDocs: url: https://github.com/gematik/api-ti-messenger servers: - - url: https://localhost/tim-information/v1.0.0/ + - url: https://{serverDomain}/tim-information/v1.0.0 + variables: + serverDomain: + description: The domain of the server + default: tobereplaced.de tags: - name: info description: This operation returns meta data about this interface and the status of available resources - - name: contacts - description: Operations for contact management + - name: lookUpDomain + description: Operations for domain lookup paths: /: get: tags: - info + summary: "Get information about the interface" description: Returns the meta data of this interface. operationId: getInfo responses: @@ -61,16 +64,17 @@ paths: /domain/findByIk: parameters: - - in: query - name: iknumber - description: "IK number to lookup the domain for." - required: true - schema: - type: string + - in: query + name: iknumber + description: "IK number to lookup the domain for." + required: true + schema: + type: string get: tags: - lookUpDomain - description: "Returns the domain that hosts user which belong to the given ik number." + summary: "Find domain by IK number" + description: "Returns the domain that hosts users which belong to the given ik number." operationId: getDomain responses: "200": @@ -83,6 +87,8 @@ paths: example: "gematiker-kk.de" "400": $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" default: @@ -119,7 +125,6 @@ components: $ref: "#/components/schemas/Error" schemas: - InfoObject: description: "" required: @@ -131,17 +136,17 @@ components: title: type: string description: "Der Titel der Anwendung" - example: "Contact Management des TI-Messengers" + example: "Contact Information API des TI-Messengers" description: type: string description: "Short description of the application" - example: "Contact Management des TI-Messengers. Betreiber: " + example: "Contact Information API des TI-Messengers. Betreiber: " contact: type: string - description: "Contact information" + description: "Kontaktinformationen des Betreibers" version: type: string - description: "Version der implementierten TiMessengerContactManagement.yaml Schnittstelle (Version der TiMessengerContactManagement.yaml Datei)" + description: "Version der implementierten TiMessengerContactInformation.yaml" example: "1.0.0" Error: @@ -159,11 +164,11 @@ components: - errorMessage securitySchemes: - bearerMatrixOpenIdTokenAuth: # arbitrary name for the security scheme + bearerMatrixOpenIdTokenAuth: # arbitrary name for the security scheme type: http scheme: bearer - bearerFormat: JWT # optional, arbitrary value for documentation purposes + bearerFormat: JWT # optional, arbitrary value for documentation purposes # the security applies to all operations security: - - bearerMatrixOpenIdTokenAuth: [] # use the same name as above + - bearerMatrixOpenIdTokenAuth: [] # use the same name as above From de6bf1cd1529ee7425e80eda4a9fe9918e0e3528 Mon Sep 17 00:00:00 2001 From: gem-jn Date: Thu, 8 Aug 2024 13:38:56 +0200 Subject: [PATCH 2/5] Update src/openapi/TiMessengerInformation.yaml Co-authored-by: Johannes Marbach --- src/openapi/TiMessengerInformation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openapi/TiMessengerInformation.yaml b/src/openapi/TiMessengerInformation.yaml index d1d2c09b..5b5e02d0 100644 --- a/src/openapi/TiMessengerInformation.yaml +++ b/src/openapi/TiMessengerInformation.yaml @@ -74,7 +74,7 @@ paths: tags: - lookUpDomain summary: "Find domain by IK number" - description: "Returns the domain that hosts users which belong to the given ik number." + description: "Returns the domain that hosts users which belong to the given IK number." operationId: getDomain responses: "200": From c9fa61c7b9bf0f586719f07fb8eb8bacd7b6bb8d Mon Sep 17 00:00:00 2001 From: gem-jn Date: Thu, 8 Aug 2024 13:39:13 +0200 Subject: [PATCH 3/5] Update src/openapi/TiMessengerInformation.yaml Co-authored-by: Johannes Marbach --- src/openapi/TiMessengerInformation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openapi/TiMessengerInformation.yaml b/src/openapi/TiMessengerInformation.yaml index 5b5e02d0..4f87233e 100644 --- a/src/openapi/TiMessengerInformation.yaml +++ b/src/openapi/TiMessengerInformation.yaml @@ -88,7 +88,7 @@ paths: "400": $ref: "#/components/responses/BadRequest" "401": - $ref: "#/components/responses/Unauthorized" + $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" default: From b379197dadbd328bbf8ff7dff6c87c72d430aabd Mon Sep 17 00:00:00 2001 From: gem-jn Date: Thu, 8 Aug 2024 13:41:24 +0200 Subject: [PATCH 4/5] Update src/openapi/TiMessengerInformation.yaml Co-authored-by: Johannes Marbach --- src/openapi/TiMessengerInformation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openapi/TiMessengerInformation.yaml b/src/openapi/TiMessengerInformation.yaml index 4f87233e..409ea36d 100644 --- a/src/openapi/TiMessengerInformation.yaml +++ b/src/openapi/TiMessengerInformation.yaml @@ -65,7 +65,7 @@ paths: /domain/findByIk: parameters: - in: query - name: iknumber + name: ikNumber description: "IK number to lookup the domain for." required: true schema: From d2b2ff8b18c0eee6a1d9d223ee9924ac231365fd Mon Sep 17 00:00:00 2001 From: gem-jn Date: Thu, 8 Aug 2024 13:48:44 +0200 Subject: [PATCH 5/5] removed version from server url and added versioning for domain search --- src/openapi/TiMessengerInformation.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openapi/TiMessengerInformation.yaml b/src/openapi/TiMessengerInformation.yaml index 409ea36d..859a77bc 100644 --- a/src/openapi/TiMessengerInformation.yaml +++ b/src/openapi/TiMessengerInformation.yaml @@ -31,7 +31,7 @@ externalDocs: url: https://github.com/gematik/api-ti-messenger servers: - - url: https://{serverDomain}/tim-information/v1.0.0 + - url: https://{serverDomain}/tim-information variables: serverDomain: description: The domain of the server @@ -62,7 +62,7 @@ paths: default: $ref: "#/components/responses/DefaultResponse" - /domain/findByIk: + /v1/domain/findByIk: parameters: - in: query name: ikNumber