Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added information api #253

Merged
merged 5 commits into from
Aug 13, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 27 additions & 22 deletions src/openapi/TiMessengerInformation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: Ich frage mich ob wir die Tags wirklich schon brauchen. Aktuell ist die Zuordnung von Tags zu Endpunkten ja noch 1:1.

Screenshot 2024-08-08 at 08 47 00

- 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:
Expand All @@ -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
ichderjens marked this conversation as resolved.
Show resolved Hide resolved
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."
ichderjens marked this conversation as resolved.
Show resolved Hide resolved
operationId: getDomain
responses:
"200":
Expand All @@ -83,6 +87,8 @@ paths:
example: "gematiker-kk.de"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional: Vielleicht könnten wir anstelle eines Strings ein Objekt zurückliefern? Da könnte man dann in Zukunft leicht weitere Felder aufnehmen ohne Inkompatibilitäten zu erzeugen. Vielleicht so:

{
  "domain": "gematiker-kk.de"
}

"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
ichderjens marked this conversation as resolved.
Show resolved Hide resolved
"404":
$ref: "#/components/responses/NotFound"
default:
Expand Down Expand Up @@ -119,7 +125,6 @@ components:
$ref: "#/components/schemas/Error"

schemas:

InfoObject:
description: ""
required:
Expand All @@ -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: <Betreibername>"
example: "Contact Information API des TI-Messengers. Betreiber: <Betreibername>"
contact:
type: string
description: "Contact information"
description: "Kontaktinformationen des Betreibers"
version:
type: string
Johennes marked this conversation as resolved.
Show resolved Hide resolved
description: "Version der implementierten TiMessengerContactManagement.yaml Schnittstelle (Version der TiMessengerContactManagement.yaml Datei)"
description: "Version der implementierten TiMessengerContactInformation.yaml"
example: "1.0.0"

Error:
Expand All @@ -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