From 3ce8f8f719a4c514c5979af08e97487452ea01ed Mon Sep 17 00:00:00 2001 From: eggwhat Date: Sun, 19 May 2024 16:08:08 +0200 Subject: [PATCH] (#31) update ntrada files for new endpoints --- .../ntrada-async.docker.yml | 93 +++++++++++++++++-- .../src/MiniSpace.APIGateway/ntrada-async.yml | 74 +++++++++++++-- .../MiniSpace.APIGateway/ntrada.docker.yml | 93 +++++++++++++++++-- 3 files changed, 233 insertions(+), 27 deletions(-) diff --git a/MiniSpace.APIGateway/src/MiniSpace.APIGateway/ntrada-async.docker.yml b/MiniSpace.APIGateway/src/MiniSpace.APIGateway/ntrada-async.docker.yml index df3440dbc..0bacf7db2 100644 --- a/MiniSpace.APIGateway/src/MiniSpace.APIGateway/ntrada-async.docker.yml +++ b/MiniSpace.APIGateway/src/MiniSpace.APIGateway/ntrada-async.docker.yml @@ -157,6 +157,8 @@ modules: localUrl: localhost:5004 url: identity-service + + reports: path: /reports routes: @@ -189,6 +191,8 @@ modules: localUrl: localhost:5005 url: reports-service + + notifications: path: /notifications routes: @@ -209,6 +213,8 @@ modules: localUrl: localhost:5006 url: notifications-service + + students: path: /students routes: @@ -266,6 +272,8 @@ modules: localUrl: localhost:5007 url: students-service + + events: path: /events routes: @@ -345,11 +353,31 @@ modules: downstream: events-service/events/organizer/{organizerId} auth: true + - upstream: /{eventId}/participants + method: GET + use: downstream + downstream: events-service/events/{eventId}/participants + auth: true + + - upstream: /{eventId}/participants + method: POST + use: downstream + downstream: events-service/events/{eventId}/participants + auth: true + + - upstream: /{eventId}/participants + method: DELETE + use: downstream + downstream: events-service/events/{eventId}/participants + auth: true + services: events-service: localUrl: localhost:5008 url: events-service + + comments: path: /comments routes: @@ -399,6 +427,8 @@ modules: localUrl: localhost:5009 url: comments-service + + reactions: path: /reactions routes: @@ -429,6 +459,8 @@ modules: localUrl: localhost:5010 url: reactions-service + + statistics: path: /statistics routes: @@ -455,6 +487,8 @@ modules: localUrl: localhost:5011 url: statistics-service + + friends: path: /friends routes: @@ -536,6 +570,8 @@ modules: localUrl: localhost:5012 url: friends-service + + posts: path: /posts routes: @@ -578,12 +614,45 @@ modules: downstream: posts-service/posts/{postId} auth: true - services: posts-service: localUrl: localhost:5013 url: posts-service - + + + + mediafiles: + path: /media-files + routes: + - upstream: / + method: POST + use: downstream + downstream: mediafiles-service/media-files + auth: true + + - upstream: /{mediaFileId} + method: GET + use: downstream + downstream: mediafiles-service/media-files/{mediaFileId} + + - upstream: /{mediaFileId}/original + method: GET + use: downstream + downstream: mediafiles-service/media-files/{mediaFileId}/original + + - upstream: /{mediaFileId} + method: DELETE + use: downstream + downstream: mediafiles-service/media-files/{mediaFileId} + auth: true + + services: + mediafiles-service: + localUrl: localhost:5014 + url: mediafiles-service + + + organizations: path: /organizations routes: @@ -592,23 +661,24 @@ modules: use: downstream downstream: organizations-service/organizations auth: true + + - upstream: /{organizationId}/children + method: POST + use: downstream + downstream: organizations-service/organizations/{organizationId}/children + auth: true - - upstream: /organizer/{organizationId}/organizer + - upstream: /{organizationId}/organizer method: POST use: downstream downstream: organizations-service/organizations/{organizationId}/organizer auth: true - - upstream: /organizer/{organizationId}/organizer/{organizerId} + - upstream: /{organizationId}/organizer/{organizerId} method: DELETE use: downstream downstream: organizations-service/organizations/{organizationId}/organizer/{organizerId} auth: true - - - upstream: / - method: GET - use: downstream - downstream: organizations-service/organizations - upstream: /{organizationId} method: GET @@ -630,6 +700,11 @@ modules: use: downstream downstream: organizations-service/organizations/{organizationId}/children + - upstream: /{organizationId}/children/all + method: GET + use: downstream + downstream: organizations-service/organizations/{organizationId}/children/all + - upstream: /organizer/{organizerId} method: GET use: downstream diff --git a/MiniSpace.APIGateway/src/MiniSpace.APIGateway/ntrada-async.yml b/MiniSpace.APIGateway/src/MiniSpace.APIGateway/ntrada-async.yml index 13df63d91..8db4a6da3 100644 --- a/MiniSpace.APIGateway/src/MiniSpace.APIGateway/ntrada-async.yml +++ b/MiniSpace.APIGateway/src/MiniSpace.APIGateway/ntrada-async.yml @@ -95,6 +95,7 @@ modules: method: GET use: return_value returnValue: Welcome to MiniSpace API [async]! + identity: path: /identity routes: @@ -352,6 +353,24 @@ modules: downstream: events-service/events/organizer/{organizerId} auth: true + - upstream: /{eventId}/participants + method: GET + use: downstream + downstream: events-service/events/{eventId}/participants + auth: true + + - upstream: /{eventId}/participants + method: POST + use: downstream + downstream: events-service/events/{eventId}/participants + auth: true + + - upstream: /{eventId}/participants + method: DELETE + use: downstream + downstream: events-service/events/{eventId}/participants + auth: true + services: events-service: localUrl: localhost:5008 @@ -595,13 +614,44 @@ modules: downstream: posts-service/posts/{postId} auth: true - services: posts-service: localUrl: localhost:5013 url: posts-service + + - + mediafiles: + path: /media-files + routes: + - upstream: / + method: POST + use: downstream + downstream: mediafiles-service/media-files + auth: true + + - upstream: /{mediaFileId} + method: GET + use: downstream + downstream: mediafiles-service/media-files/{mediaFileId} + + - upstream: /{mediaFileId}/original + method: GET + use: downstream + downstream: mediafiles-service/media-files/{mediaFileId}/original + + - upstream: /{mediaFileId} + method: DELETE + use: downstream + downstream: mediafiles-service/media-files/{mediaFileId} + auth: true + + services: + mediafiles-service: + localUrl: localhost:5014 + url: mediafiles-service + + organizations: path: /organizations @@ -611,23 +661,24 @@ modules: use: downstream downstream: organizations-service/organizations auth: true + + - upstream: /{organizationId}/children + method: POST + use: downstream + downstream: organizations-service/organizations/{organizationId}/children + auth: true - - upstream: /organizer/{organizationId}/organizer + - upstream: /{organizationId}/organizer method: POST use: downstream downstream: organizations-service/organizations/{organizationId}/organizer auth: true - - upstream: /organizer/{organizationId}/organizer/{organizerId} + - upstream: /{organizationId}/organizer/{organizerId} method: DELETE use: downstream downstream: organizations-service/organizations/{organizationId}/organizer/{organizerId} auth: true - - - upstream: / - method: GET - use: downstream - downstream: organizations-service/organizations - upstream: /{organizationId} method: GET @@ -649,6 +700,11 @@ modules: use: downstream downstream: organizations-service/organizations/{organizationId}/children + - upstream: /{organizationId}/children/all + method: GET + use: downstream + downstream: organizations-service/organizations/{organizationId}/children/all + - upstream: /organizer/{organizerId} method: GET use: downstream diff --git a/MiniSpace.APIGateway/src/MiniSpace.APIGateway/ntrada.docker.yml b/MiniSpace.APIGateway/src/MiniSpace.APIGateway/ntrada.docker.yml index 221305f1d..bf7d63347 100644 --- a/MiniSpace.APIGateway/src/MiniSpace.APIGateway/ntrada.docker.yml +++ b/MiniSpace.APIGateway/src/MiniSpace.APIGateway/ntrada.docker.yml @@ -134,6 +134,8 @@ modules: localUrl: localhost:5004 url: identity-service + + reports: path: /reports routes: @@ -166,6 +168,8 @@ modules: localUrl: localhost:5005 url: reports-service + + notifications: path: /notifications routes: @@ -186,6 +190,8 @@ modules: localUrl: localhost:5006 url: notifications-service + + students: path: /students routes: @@ -243,6 +249,8 @@ modules: localUrl: localhost:5007 url: students-service + + events: path: /events routes: @@ -322,11 +330,31 @@ modules: downstream: events-service/events/organizer/{organizerId} auth: true + - upstream: /{eventId}/participants + method: GET + use: downstream + downstream: events-service/events/{eventId}/participants + auth: true + + - upstream: /{eventId}/participants + method: POST + use: downstream + downstream: events-service/events/{eventId}/participants + auth: true + + - upstream: /{eventId}/participants + method: DELETE + use: downstream + downstream: events-service/events/{eventId}/participants + auth: true + services: events-service: localUrl: localhost:5008 url: events-service + + comments: path: /comments routes: @@ -376,6 +404,8 @@ modules: localUrl: localhost:5009 url: comments-service + + reactions: path: /reactions routes: @@ -406,6 +436,8 @@ modules: localUrl: localhost:5010 url: reactions-service + + statistics: path: /statistics routes: @@ -432,6 +464,8 @@ modules: localUrl: localhost:5011 url: statistics-service + + friends: path: /friends routes: @@ -513,6 +547,8 @@ modules: localUrl: localhost:5012 url: friends-service + + posts: path: /posts routes: @@ -555,12 +591,45 @@ modules: downstream: posts-service/posts/{postId} auth: true - services: posts-service: localUrl: localhost:5013 url: posts-service - + + + + mediafiles: + path: /media-files + routes: + - upstream: / + method: POST + use: downstream + downstream: mediafiles-service/media-files + auth: true + + - upstream: /{mediaFileId} + method: GET + use: downstream + downstream: mediafiles-service/media-files/{mediaFileId} + + - upstream: /{mediaFileId}/original + method: GET + use: downstream + downstream: mediafiles-service/media-files/{mediaFileId}/original + + - upstream: /{mediaFileId} + method: DELETE + use: downstream + downstream: mediafiles-service/media-files/{mediaFileId} + auth: true + + services: + mediafiles-service: + localUrl: localhost:5014 + url: mediafiles-service + + + organizations: path: /organizations routes: @@ -569,23 +638,24 @@ modules: use: downstream downstream: organizations-service/organizations auth: true + + - upstream: /{organizationId}/children + method: POST + use: downstream + downstream: organizations-service/organizations/{organizationId}/children + auth: true - - upstream: /organizer/{organizationId}/organizer + - upstream: /{organizationId}/organizer method: POST use: downstream downstream: organizations-service/organizations/{organizationId}/organizer auth: true - - upstream: /organizer/{organizationId}/organizer/{organizerId} + - upstream: /{organizationId}/organizer/{organizerId} method: DELETE use: downstream downstream: organizations-service/organizations/{organizationId}/organizer/{organizerId} auth: true - - - upstream: / - method: GET - use: downstream - downstream: organizations-service/organizations - upstream: /{organizationId} method: GET @@ -607,6 +677,11 @@ modules: use: downstream downstream: organizations-service/organizations/{organizationId}/children + - upstream: /{organizationId}/children/all + method: GET + use: downstream + downstream: organizations-service/organizations/{organizationId}/children/all + - upstream: /organizer/{organizerId} method: GET use: downstream