Przeglądaj źródła

Fixed swagger

Feature
Safet Purkovic 4 lat temu
rodzic
commit
bc8ef64ed0
4 zmienionych plików z 82 dodań i 1 usunięć
  1. 2
    0
      .gitignore
  2. 35
    0
      .vscode/launch.json
  3. 42
    0
      .vscode/tasks.json
  4. 3
    1
      BlackRock.Reporting.API/Program.cs

+ 2
- 0
.gitignore Wyświetl plik

@@ -0,0 +1,2 @@
bin/
debug/

+ 35
- 0
.vscode/launch.json Wyświetl plik

@@ -0,0 +1,35 @@
{
"version": "0.2.0",
"configurations": [
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"name": ".NET Core Launch (web)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/BlackRock.Reporting.API/bin/Debug/net6.0/BlackRock.Reporting.API.dll",
"args": [],
"cwd": "${workspaceFolder}/BlackRock.Reporting.API",
"stopAtEntry": false,
// Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
"serverReadyAction": {
"action": "openExternally",
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"sourceFileMap": {
"/Views": "${workspaceFolder}/Views"
}
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach"
}
]
}

+ 42
- 0
.vscode/tasks.json Wyświetl plik

@@ -0,0 +1,42 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/BlackRock.Reporting.API/BlackRock.Reporting.API.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/BlackRock.Reporting.API/BlackRock.Reporting.API.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"${workspaceFolder}/BlackRock.Reporting.API/BlackRock.Reporting.API.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
}
]
}

+ 3
- 1
BlackRock.Reporting.API/Program.cs Wyświetl plik

@@ -16,7 +16,9 @@ var app = builder.Build();
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "BlackRock.Reporting.API v1"));
app.UseSwaggerUI(c => {
c.SwaggerEndpoint("/swagger/v1/swagger.json", "BlackRock.Reporting.API v1");
c.RoutePrefix = string.Empty;});
}

app.UseHttpsRedirection();

Ładowanie…
Anuluj
Zapisz