Updated API route

This commit is contained in:
Santhosh S
2023-08-29 22:23:40 -04:00
parent 82cfa5706a
commit e0cb2ccc7d
51 changed files with 1157 additions and 193 deletions

View File

@ -5,7 +5,7 @@ using Microsoft.OpenApi.Any;
namespace DamageAssesment.Api.Answers.Controllers
{
[Route("api")]
//[Route("api")]
[ApiController]
public class AnswersController: ControllerBase
{

View File

@ -1,21 +1,39 @@
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
# Use the ASP.NET base image
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
WORKDIR /app
EXPOSE 80
# Use the SDK image for building
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
# Copy the project file and restore dependencies
COPY ["DamageAssesment.Api.Answers/DamageAssesment.Api.Answers.csproj", "DamageAssesment.Api.Answers/"]
RUN dotnet restore "DamageAssesment.Api.Answers/DamageAssesment.Api.Answers.csproj"
# Copy the source code
COPY . .
WORKDIR "/src/DamageAssesment.Api.Answers"
# Build the application
RUN dotnet build "DamageAssesment.Api.Answers.csproj" -c Release -o /app/build
# Publish the application
FROM build AS publish
RUN dotnet publish "DamageAssesment.Api.Answers.csproj" -c Release -o /app/publish /p:UseAppHost=false
# Set up the final image
FROM base AS final
WORKDIR /app
# Copy the published files
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "DamageAssesment.Api.Answers.dll"]
## Set up the volume and copy the XML comments
#VOLUME /xmlcomments
#COPY ["DamageAssesment.Api.Answers.xml", "/xmlcomments/DamageAssesment.Api.Answers.xml"]
#
# Specify the entry point for the container
ENTRYPOINT ["dotnet", "DamageAssesment.Api.Answers.dll"]

View File

@ -39,7 +39,7 @@ if (app.Environment.IsDevelopment())
app.UseSwaggerUI(options =>
{
options.SwaggerEndpoint("/swagger/v1/swagger.json","" );
// options.RoutePrefix = ""; // Serve Swagger UI at the root URL
});
}