fix(dc): 🐛 debug docker compose/swagger experience

This commit is contained in:
Collin M. Barrett 2021-11-02 14:07:05 -05:00
parent 132ec7ad0d
commit ca32621cf1
4 changed files with 6 additions and 13 deletions

View file

@ -1,2 +1,3 @@
bin/
obj/
obj/
*.dcproj.user

View file

@ -5,8 +5,8 @@
<DockerTargetOS>Linux</DockerTargetOS>
<ProjectGuid>8f04c802-830b-4b6d-8d53-5d2a87b4223d</ProjectGuid>
<DockerLaunchAction>LaunchBrowser</DockerLaunchAction>
<DockerServiceUrl>{Scheme}://localhost:{ServicePort}/v1/lists</DockerServiceUrl>
<DockerServiceName>filterlists</DockerServiceName>
<DockerServiceUrl>http://localhost:8080/api/</DockerServiceUrl>
<DockerServiceName>directory-api</DockerServiceName>
</PropertyGroup>
<ItemGroup>
<None Include=".env" />

View file

@ -42,11 +42,7 @@ public static void UseSwagger(this IApplicationBuilder app)
o.RouteTemplate = "{documentName}/swagger.json";
o.PreSerializeFilters.Add((swaggerDoc, httpReq) => swaggerDoc.Servers = new List<OpenApiServer>
{
#if DEBUG
new() { Url = $"{httpReq.Scheme}://{httpReq.Host.Value}:8080/api/archival" }
#else
new() { Url = $"https://{httpReq.Host.Value}/api/archival" }
#endif
new() { Url = $"{httpReq.Scheme}://{httpReq.Host.Value}/api/archival" }
});
});
}

View file

@ -41,11 +41,7 @@ public static void UseSwagger(this IApplicationBuilder app)
o.RouteTemplate = "{documentName}/swagger.json";
o.PreSerializeFilters.Add((swaggerDoc, httpReq) => swaggerDoc.Servers = new List<OpenApiServer>
{
#if DEBUG
new() { Url = $"{httpReq.Scheme}://{httpReq.Host.Value}:8080/api/directory" }
#else
new() { Url = $"https://{httpReq.Host.Value}/api/directory" }
#endif
new() { Url = $"{httpReq.Scheme}://{httpReq.Host.Value}/api/directory" }
});
});
}