From f5f9a3c309aaeccd60bd1c01f7c6b972207e1fee Mon Sep 17 00:00:00 2001 From: MaxchilKH Date: Sat, 18 Jul 2020 16:44:59 +0200 Subject: [PATCH] Api prefix from env --- .docker/docker-compose.yaml | 2 +- src/InternshipSystem.Api/Startup.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.docker/docker-compose.yaml b/.docker/docker-compose.yaml index 214b576..fc4967b 100644 --- a/.docker/docker-compose.yaml +++ b/.docker/docker-compose.yaml @@ -6,6 +6,7 @@ services: environment: CONNECTIONSTRINGS__INTERNSHIPDATABASE: "Host=db.postgres;Port=5432;Database=postgres;Username=postgres;Password=szwoniu" ASPNETCORE_ENVIRONMENT: Development + APIPREFIX: /api depends_on: - db.postgres ports: @@ -19,4 +20,3 @@ services: PGDATA: /postgres ports: - 5432:5432 - \ No newline at end of file diff --git a/src/InternshipSystem.Api/Startup.cs b/src/InternshipSystem.Api/Startup.cs index 2608009..aa5f0c8 100644 --- a/src/InternshipSystem.Api/Startup.cs +++ b/src/InternshipSystem.Api/Startup.cs @@ -42,7 +42,7 @@ namespace InternshipSystem.Api app .UseSwagger() - .UseSwaggerUI(options => options.SwaggerEndpoint("/api/swagger/v1/swagger.json", "InternshipSystem Api")) + .UseSwaggerUI(options => options.SwaggerEndpoint(Path.Join(Configuration.GetValue("ApiPrefix"), "/swagger/v1/swagger.json"), "InternshipSystem Api")) .UseHttpsRedirection() .UseRouting() .UseAuthorization()