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

ZO-4598: add 'summy' API endpoints #124

Merged
merged 3 commits into from
Mar 26, 2024
Merged
Changes from all commits
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
97 changes: 97 additions & 0 deletions docs/api/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,42 @@ paths:
"404":
description: "Expired or non-existing freebie"

/summy/summaries:
get:
operationId: getSummary
description: Get a summary
tags:
- summaries
parameters:
- $ref: '#/components/parameters/rowFilter.summaries.id'
- $ref: '#/components/parameters/select'
responses:
"200":
description: return summaries
content:
application/json:
schema:
items:
$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:
parameters:
Expand Down Expand Up @@ -1688,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.<pk/>
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
Expand Down