From 232bdd9a982a4694cbc0ca73faeec92d0869282b Mon Sep 17 00:00:00 2001 From: Martin Fiebig Date: Wed, 11 Dec 2024 12:59:43 +0100 Subject: [PATCH] Remove authentication from fd_openapi as this part is depending on the use case Add clarification to channel configuration post --- docs_sources/definitions/channels_get.yaml | 6 +-- docs_sources/definitions/channels_post.yaml | 2 +- docs_sources/fd_openapi.yaml | 32 +++++----------- docs_sources/index.html | 38 +++++++++---------- images/diagrams/channel.svg | 2 +- images/diagrams/erm.svg | 2 +- images/diagrams/push_overview.svg | 2 +- .../diagrams/push_overview_authentication.svg | 2 +- images/diagrams/registration.svg | 2 +- images/diagrams/send_push.svg | 2 +- .../diagrams/send_push_multiple_backends.svg | 2 +- images/diagrams/send_push_preview.svg | 2 +- 12 files changed, 41 insertions(+), 53 deletions(-) diff --git a/docs_sources/definitions/channels_get.yaml b/docs_sources/definitions/channels_get.yaml index 890ecc4..d8153ea 100644 --- a/docs_sources/definitions/channels_get.yaml +++ b/docs_sources/definitions/channels_get.yaml @@ -1,9 +1,9 @@ examples: response: - status: { + value: { "channels": [ { - "id": "channel1" + "id": "channel1", "status": "enabled" }, { @@ -29,5 +29,5 @@ schema: type: string enum: ["enabled", "disabled", "not_set"] required: - - name + - id - status diff --git a/docs_sources/definitions/channels_post.yaml b/docs_sources/definitions/channels_post.yaml index c070cb4..45a435e 100644 --- a/docs_sources/definitions/channels_post.yaml +++ b/docs_sources/definitions/channels_post.yaml @@ -1,5 +1,5 @@ examples: - response: + update: value: { "channels": [ { diff --git a/docs_sources/fd_openapi.yaml b/docs_sources/fd_openapi.yaml index afa1c58..03b23ad 100644 --- a/docs_sources/fd_openapi.yaml +++ b/docs_sources/fd_openapi.yaml @@ -50,8 +50,6 @@ paths: } tags: - Setup - security: - - bearerAuth: [] /pushers/v1/set: post: summary: Modify a pusher for this user on the homeserver. @@ -106,14 +104,14 @@ paths: application/json: schema: $ref: definitions/rate_limited.yaml - security: - - bearerAuth: [] tags: - Setup /channels/v1/{pushtoken}: get: summary: Gets channels for a specific device. - description: Gets all channels and there configuration state of the users device identified by the `pushtoken`. + description: |- + Gets all channels and there configuration state of the users device identified by the + `pushtoken`. operationId: getChannelsOfDevice parameters: - name: pushtoken @@ -156,13 +154,14 @@ paths: } tags: - Fachdienst - security: - - bearerAuth: [] post: summary: Modify the channels for a specific device. description: |- This endpoint allows the creation, modification and deletion of channel subscriptions - for a specific device identified by `pushtoken`. + for a specific device identified by `pushtoken`. If a channel is not present in the POST + request, the state of the channel on the server is not changed. + An unset channel is treated as disabled and thus no pushes will be triggerd that correspond + to the channel. operationId: postChannelsOfDevice parameters: - name: pushtoken @@ -178,10 +177,8 @@ paths: schema: $ref: definitions/channels_post.yaml#/schema examples: - registration: - $ref: definitions/channels_post.yaml#/examples/registration - deletion: - $ref: definitions/channels_post.yaml#/examples/deletion + update: + $ref: definitions/channels_post.yaml#/examples/update description: The channel information. required: true responses: @@ -215,8 +212,6 @@ paths: $ref: definitions/rate_limited.yaml tags: - Fachdienst - security: - - bearerAuth: [] /channels/v1: get: summary: Gets the available channels for the authenticated user @@ -255,8 +250,6 @@ paths: } tags: - Fachdienst - security: - - bearerAuth: [] servers: - url: "{protocol}://{hostname}{basePath}" variables: @@ -269,9 +262,4 @@ servers: default: localhost:8008 basePath: default: /client/v1 -components: - securitySchemes: - bearerAuth: - type: http - scheme: bearer - bearerFormat: JWT \ No newline at end of file +security: [] diff --git a/docs_sources/index.html b/docs_sources/index.html index 8b19786..dfed71a 100644 --- a/docs_sources/index.html +++ b/docs_sources/index.html @@ -44,7 +44,7 @@