From 570f6ebda095b084b4c0d2090ac4e776d10e6ba5 Mon Sep 17 00:00:00 2001 From: Jan Stroppel Date: Sat, 7 Dec 2024 16:24:41 +0100 Subject: [PATCH 1/4] added search endpoint --- api/swagger.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/api/swagger.yaml b/api/swagger.yaml index b033b73..95c90b3 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -300,6 +300,22 @@ paths: type: array items: $ref: "#/components/schemas/recommendable" + /search: + get: + summary: retrieves all dancers in a predefined range + tags: + - Recommendations + parameters: + - $ref: '#/components/parameters/range' + responses: + '200': + description: retrieves a potentially empty array + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/recommendable" /location/zipCode/{country}/{code}: get: summary: resolve code to location @@ -631,6 +647,12 @@ components: description: Id of the last message already received. If set, the endpoint only returns newer messages schema: type: string + range: + name: range + in: query + description: Range in which the search for dancers should be done + schema: + type: string schemas: contactMail: type: object From 6861794e79d0a063ff0fe754a85632662c43b896 Mon Sep 17 00:00:00 2001 From: Jan Stroppel Date: Sat, 7 Dec 2024 16:40:05 +0100 Subject: [PATCH 2/4] adjusted endpoint --- api/swagger.yaml | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/api/swagger.yaml b/api/swagger.yaml index 95c90b3..841a476 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -300,22 +300,6 @@ paths: type: array items: $ref: "#/components/schemas/recommendable" - /search: - get: - summary: retrieves all dancers in a predefined range - tags: - - Recommendations - parameters: - - $ref: '#/components/parameters/range' - responses: - '200': - description: retrieves a potentially empty array - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/recommendable" /location/zipCode/{country}/{code}: get: summary: resolve code to location @@ -571,9 +555,25 @@ paths: description: "" /dancers: + get: + summary: retrieves all dancers in a predefined range + tags: + - Dancers + parameters: + - $ref: '#/components/parameters/range' + responses: + '200': + description: retrieves a potentially empty array + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/recommendable" post: summary: Used to retrieve a list of dancers tags: + - Dancers - Chats requestBody: content: @@ -599,6 +599,7 @@ paths: application/json: schema: $ref: '#/components/schemas/error' + components: securitySchemes: jwt-token: @@ -650,7 +651,7 @@ components: range: name: range in: query - description: Range in which the search for dancers should be done + description: Range [km] in which the search for dancers should be done schema: type: string schemas: @@ -1022,4 +1023,4 @@ components: type: string required: - code - - message + - message \ No newline at end of file From 5bc580a2a6271a262cf69ea7025f499aec2d0d26 Mon Sep 17 00:00:00 2001 From: Jan Stroppel Date: Sat, 7 Dec 2024 17:04:47 +0100 Subject: [PATCH 3/4] adjusted payload --- api/swagger.yaml | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/api/swagger.yaml b/api/swagger.yaml index 841a476..212c05d 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -561,6 +561,7 @@ paths: - Dancers parameters: - $ref: '#/components/parameters/range' + - $ref: '#/components/parameters/gender' responses: '200': description: retrieves a potentially empty array @@ -569,7 +570,7 @@ paths: schema: type: array items: - $ref: "#/components/schemas/recommendable" + $ref: "#/components/schemas/dancer" post: summary: Used to retrieve a list of dancers tags: @@ -648,6 +649,12 @@ components: description: Id of the last message already received. If set, the endpoint only returns newer messages schema: type: string + gender: + name: gender + in: query + description: preferred gender of the dancers + schema: + type: string range: name: range in: query @@ -745,6 +752,31 @@ components: - LEAD - BOTH - NA + dancer: + type: object + properties: + size: + type: integer + aboutMe: + type: string + gender: + $ref: "#/components/schemas/gender" + dancerName: + type: string + age: + type: integer + city: + type: string + country: + type: string + enum: + - GER + profileImageHash: + type: string + ableTo: + type: array + items: + $ref: "#/components/schemas/dance_profile" change_profile: type: object properties: @@ -1023,4 +1055,4 @@ components: type: string required: - code - - message \ No newline at end of file + - message From 783b6aafcad6b7b344bfa1d1a4187c7eb005a493 Mon Sep 17 00:00:00 2001 From: Jan Stroppel Date: Tue, 10 Dec 2024 11:03:51 +0100 Subject: [PATCH 4/4] using public profile for search --- api/swagger.yaml | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/api/swagger.yaml b/api/swagger.yaml index 212c05d..17ef452 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -570,7 +570,7 @@ paths: schema: type: array items: - $ref: "#/components/schemas/dancer" + $ref: "#/components/schemas/public_profile" post: summary: Used to retrieve a list of dancers tags: @@ -752,31 +752,6 @@ components: - LEAD - BOTH - NA - dancer: - type: object - properties: - size: - type: integer - aboutMe: - type: string - gender: - $ref: "#/components/schemas/gender" - dancerName: - type: string - age: - type: integer - city: - type: string - country: - type: string - enum: - - GER - profileImageHash: - type: string - ableTo: - type: array - items: - $ref: "#/components/schemas/dance_profile" change_profile: type: object properties: @@ -820,9 +795,8 @@ components: $ref: "#/components/schemas/gender" dancerName: type: string - birthDate: + age: type: string - format: date ableTo: type: array items: