Skip to content
This repository was archived by the owner on Mar 28, 2025. It is now read-only.

Commit 05e60cd

Browse files
committed
SHARE-442 Survey Update
- adds survey endpoint - updates headers for caching - adds headers to media library for caching
1 parent f8b0fab commit 05e60cd

File tree

1 file changed

+74
-9
lines changed

1 file changed

+74
-9
lines changed

catroweb.yaml

Lines changed: 74 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ openapi: 3.0.2
22
info:
33
title: Catroweb API
44
description: API for the Catrobat Share Platform
5-
version: "v1.0.52"
5+
version: "v1.0.53"
66
termsOfService: 'https://share.catrob.at/pocketcode/termsOfUse'
77
contact:
88
name: Catrobat
@@ -174,6 +174,36 @@ paths:
174174
responses:
175175
'204':
176176
description: System is alive and healthy!
177+
/survey/{langCode}:
178+
get:
179+
parameters:
180+
- in: path
181+
name: langCode
182+
schema:
183+
type: string
184+
example: de
185+
required: true
186+
description: 2 letter Language-Code is based on ISO693-1 (e.g. German = de, English = en, Russian = ru)
187+
tags:
188+
- Utility
189+
summary: Get survey link for given language code.
190+
responses:
191+
'200':
192+
description: OK
193+
content:
194+
application/json:
195+
schema:
196+
$ref: '#/components/schemas/SurveyResponse'
197+
headers:
198+
X-Response-Hash:
199+
schema:
200+
type: string
201+
example: '56asfd5a56sfd564a56dsf65a56sdf'
202+
description: 'MD5 Hash of response body. Used for caching responses.'
203+
'400':
204+
$ref: '#/components/responses/BadRequest'
205+
'404':
206+
$ref: '#/components/responses/NotFound'
177207

178208
##############################################
179209
# User
@@ -373,7 +403,7 @@ paths:
373403
schema:
374404
type: string
375405
example: '56asfd5a56sfd564a56dsf65a56sdf'
376-
description: 'IF you send a HEAD request you will only get this hash'
406+
description: 'MD5 Hash of response body. Used for caching responses.'
377407
'400':
378408
$ref: '#/components/responses/BadRequest'
379409
'406':
@@ -443,7 +473,7 @@ paths:
443473
schema:
444474
type: string
445475
example: '56asfd5a56sfd564a56dsf65a56sdf'
446-
description: 'IF you send a HEAD request you will only get this hash'
476+
description: 'MD5 Hash of response body. Used for caching responses.'
447477
content:
448478
application/json:
449479
schema:
@@ -476,7 +506,7 @@ paths:
476506
schema:
477507
type: string
478508
example: '56asfd5a56sfd564a56dsf65a56sdf'
479-
description: 'IF you send a HEAD request you will only get this hash'
509+
description: 'MD5 Hash of response body. Used for caching responses.'
480510
content:
481511
application/json:
482512
schema:
@@ -506,7 +536,7 @@ paths:
506536
schema:
507537
type: string
508538
example: '56asfd5a56sfd564a56dsf65a56sdf'
509-
description: 'IF you send a HEAD request you will only get this hash'
539+
description: 'MD5 Hash of response body. Used for caching responses.'
510540
content:
511541
application/json:
512542
schema:
@@ -537,7 +567,7 @@ paths:
537567
schema:
538568
type: string
539569
example: '56asfd5a56sfd564a56dsf65a56sdf'
540-
description: 'IF you send a HEAD request you will only get this hash'
570+
description: 'MD5 Hash of response body. Used for caching responses.'
541571
content:
542572
application/json:
543573
schema:
@@ -564,7 +594,7 @@ paths:
564594
schema:
565595
type: string
566596
example: '56asfd5a56sfd564a56dsf65a56sdf'
567-
description: 'IF you send a HEAD request you will only get this hash'
597+
description: 'MD5 Hash of response body. Used for caching responses.'
568598
content:
569599
application/json:
570600
schema:
@@ -626,7 +656,7 @@ paths:
626656
schema:
627657
type: string
628658
example: '56asfd5a56sfd564a56dsf65a56sdf'
629-
description: 'IF you send a HEAD request you will only get this hash'
659+
description: 'MD5 Hash of response body. Used for caching responses.'
630660
content:
631661
application/json:
632662
schema:
@@ -736,6 +766,12 @@ paths:
736766
application/json:
737767
schema:
738768
$ref: '#/components/schemas/MediaFilesResponse'
769+
headers:
770+
X-Response-Hash:
771+
schema:
772+
type: string
773+
example: '56asfd5a56sfd564a56dsf65a56sdf'
774+
description: 'MD5 Hash of response body. Used for caching responses.'
739775
'400':
740776
$ref: '#/components/responses/BadRequest'
741777
'404':
@@ -759,6 +795,12 @@ paths:
759795
application/json:
760796
schema:
761797
$ref: '#/components/schemas/MediaFilesResponse'
798+
headers:
799+
X-Response-Hash:
800+
schema:
801+
type: string
802+
example: '56asfd5a56sfd564a56dsf65a56sdf'
803+
description: 'MD5 Hash of response body. Used for caching responses.'
762804
'400':
763805
$ref: '#/components/responses/BadRequest'
764806
'406':
@@ -784,6 +826,12 @@ paths:
784826
application/json:
785827
schema:
786828
$ref: '#/components/schemas/MediaFileResponse'
829+
headers:
830+
X-Response-Hash:
831+
schema:
832+
type: string
833+
example: '56asfd5a56sfd564a56dsf65a56sdf'
834+
description: 'MD5 Hash of response body. Used for caching responses.'
787835
'400':
788836
$ref: '#/components/responses/BadRequest'
789837
'404':
@@ -818,6 +866,12 @@ paths:
818866
application/json:
819867
schema:
820868
$ref: '#/components/schemas/MediaFilesResponse'
869+
headers:
870+
X-Response-Hash:
871+
schema:
872+
type: string
873+
example: '56asfd5a56sfd564a56dsf65a56sdf'
874+
description: 'MD5 Hash of response body. Used for caching responses.'
821875
'400':
822876
$ref: '#/components/responses/BadRequest'
823877
'406':
@@ -1535,4 +1589,15 @@ components:
15351589
description: Notification message
15361590
prize:
15371591
type: string
1538-
description: Prize for anniversary notifications
1592+
description: Prize for anniversary notifications
1593+
1594+
######################################################
1595+
# Utility Schemas
1596+
###
1597+
SurveyResponse:
1598+
type: object
1599+
properties:
1600+
url:
1601+
type: string
1602+
example: https://www.surveylegend.com/survey/#/d29yZHByZXNzMTQzODU2~-MRPPYfbYj7-rPUTK3HH
1603+
description: Url to a survey for the given language

0 commit comments

Comments
 (0)