From 0807847a77c6ceee09d128ca893fab3e8344c64a Mon Sep 17 00:00:00 2001 From: Tobias Kabbeck Date: Fri, 15 Mar 2024 14:58:40 +0100 Subject: [PATCH 1/3] ZO-4598: Add summy summaries endpoint --- docs/api/api.yaml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/docs/api/api.yaml b/docs/api/api.yaml index afa67b3..74e1ce6 100644 --- a/docs/api/api.yaml +++ b/docs/api/api.yaml @@ -320,6 +320,46 @@ paths: "404": description: "Expired or non-existing freebie" + /summy/summaries: + get: + tags: + - summaries + parameters: + - in: query + name: id + schema: + type: string + pattern: '^eq.[-a-f0-9]+$' + required: true + description: "The UUID for the summary" + responses: + "200": + description: OK + content: + application/json: + schema: + type: array + items: + type: object + required: + - token + - content + - path + - created + properties: + id: + $ref: "#/components/schemas/UUID" + summary: + format: text + type: string + example: Ein lustige Zusammenfassung + created: + format: timestamp with time zone + type: string + example: 2024-02-09T17:48:39.27587+00:00 + config: + format: jsonb + /iap/receipts/{platform}: post: parameters: From 8babfe00b21c375c298ba3825cb2396e0f98d848 Mon Sep 17 00:00:00 2001 From: Tobias Kabbeck Date: Fri, 15 Mar 2024 16:34:48 +0100 Subject: [PATCH 2/3] ZO-4598: Correct types in summaries and remove format (Needs openapi 3) --- docs/api/api.yaml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/api/api.yaml b/docs/api/api.yaml index 74e1ce6..9262425 100644 --- a/docs/api/api.yaml +++ b/docs/api/api.yaml @@ -342,23 +342,22 @@ paths: items: type: object required: - - token - - content - - path + - id + - summary - created + - config properties: id: $ref: "#/components/schemas/UUID" summary: - format: text type: string example: Ein lustige Zusammenfassung created: - format: timestamp with time zone type: string example: 2024-02-09T17:48:39.27587+00:00 config: - format: jsonb + type: integer + example: 1 /iap/receipts/{platform}: post: From 09c3f52869ad2ed2b23e7c0a3dbba044d4bf8c40 Mon Sep 17 00:00:00 2001 From: Tobias Kabbeck Date: Tue, 26 Mar 2024 14:35:15 +0100 Subject: [PATCH 3/3] ZO-4598: Adjust api.yaml according summy api.yaml See https://github.com/ZeitOnline/summy/blob/main/api.yaml --- docs/api/api.yaml | 112 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 85 insertions(+), 27 deletions(-) diff --git a/docs/api/api.yaml b/docs/api/api.yaml index 9262425..c954545 100644 --- a/docs/api/api.yaml +++ b/docs/api/api.yaml @@ -322,42 +322,39 @@ paths: /summy/summaries: get: + operationId: getSummary + description: Get a summary tags: - summaries parameters: - - in: query - name: id - schema: - type: string - pattern: '^eq.[-a-f0-9]+$' - required: true - description: "The UUID for the summary" + - $ref: '#/components/parameters/rowFilter.summaries.id' + - $ref: '#/components/parameters/select' responses: "200": - description: OK + description: return summaries content: application/json: schema: - type: array items: - type: object - required: - - id - - summary - - created - - config - properties: - id: - $ref: "#/components/schemas/UUID" - summary: - type: string - example: Ein lustige Zusammenfassung - created: - type: string - example: 2024-02-09T17:48:39.27587+00:00 - config: - type: integer - example: 1 + $ref: '#/components/schemas/summaries' + + /summy/feedback: + post: + operationId: postFeedback + description: Saves a feedback + tags: + - feedback + summary: Add a new feedback to the database + requestBody: + description: A feedback to a summary + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/feedback' + responses: + '201': + description: Created. /iap/receipts/{platform}: post: @@ -1727,6 +1724,67 @@ components: - "iqdpremium": user has abo - "iqdpremium_registered": user is registered user + summaries: + description: properties of "summary" row + type: object + properties: + id: + description: |- + Note: + This is a Primary Key. + format: uuid + type: string + summary: + format: text + type: string + example: Ein lustige Zusammenfassung + created: + format: timestamp with time zone + type: string + example: 2024-02-09T17:48:39.27587+00:00 + config: + format: jsonb + + feedback: + description: properties of "feedback" row + type: object + required: + - summary_id + - feedback + properties: + summary_id: + type: integer + ssoid: + type: integer + feedback: + type: string + enum: [like, dislike] + text: + format: text + type: string + example: Das ist fantastisch zusammengefasst + created: + format: timestamp with time zone + type: string + example: 2024-03-09T07:48:39.27587+00:00 + + parameters: + select: + name: select + description: select output columns + required: false + in: query + schema: + type: string + rowFilter.summaries.id: + name: rowFilter.summaries.id + description: filter Columns by "summary" id + required: false + in: query + schema: + type: string + pattern: '^eq.[-a-f0-9]+$' + securitySchemes: default: type: http