From c4ef5c6095eaaaf6208840d9bcc6474eb0988f25 Mon Sep 17 00:00:00 2001 From: tobias <thinkdifferent055@gmail.com> Date: Thu, 24 Sep 2020 20:14:01 +0200 Subject: [PATCH] Improve authentication in api documentation --- docs/api.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/api.yml b/docs/api.yml index 8f8ef45..15517cf 100644 --- a/docs/api.yml +++ b/docs/api.yml @@ -139,13 +139,8 @@ paths: post: summary: Adds a new measurement. Non-existent device or sensor will be created automatically. operationId: addMeasurement - parameters: - - in: header - name: apiKey - description: The api key - required: true - schema: - type: string + security: + - bearerAuth: [] requestBody: description: Measurement to add required: true @@ -186,6 +181,12 @@ paths: $ref: '#/components/schemas/Measurement' components: + securitySchemes: + bearerAuth: + type: apiKey + name: apiKey + in: header + schemas: Version: type: object -- GitLab