Skip to content
This repository was archived by the owner on Apr 17, 2025. It is now read-only.

Commit a9bbdcf

Browse files
committed
Aggiornata documentazione Swagger
closes #53
1 parent d006c5c commit a9bbdcf

File tree

4 files changed

+14
-9
lines changed

4 files changed

+14
-9
lines changed

src/NET6CustomLibrary/Docs/Swagger/README-Swagger.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# SwaggerUI configuration
22

3-
43
## Registering services at Startup (with xml documentation)
54

65
```csharp
@@ -24,13 +23,13 @@ public void ConfigureServices(IServiceCollection services)
2423
2524
public void Configure(WebApplication app)
2625
{
27-
app.AddUseSwaggerUI("My Web Api v1");
26+
app.UseSwaggerUI("My Web Api v1");
27+
//OR app.UseSwaggerUINoEmptyRoutePrefix("My Web Api v1");
2828
}
2929
```
3030

3131
<b>Note:</b> If you want to add xml documentation to web api you need to add TRUE value to GenerateDocumentationFile tag to csproj project file.
3232

33-
3433
## Registering services at Startup (without xml documentation)
3534

3635
```csharp

src/NET6CustomLibrary/Docs/Swagger/README-SwaggerDateTime.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ public void ConfigureServices(IServiceCollection services)
2424
2525
public void Configure(WebApplication app)
2626
{
27-
app.AddUseSwaggerUI("My Web Api v1");
27+
app.UseSwaggerUI("My Web Api v1");
28+
//OR app.UseSwaggerUINoEmptyRoutePrefix("My Web Api v1");
2829
}
2930
```
3031

@@ -51,6 +52,7 @@ public void ConfigureServices(IServiceCollection services)
5152
5253
public void Configure(WebApplication app)
5354
{
54-
app.AddUseSwaggerUI("My Web Api v1");
55+
app.UseSwaggerUI("My Web Api v1");
56+
//OR app.UseSwaggerUINoEmptyRoutePrefix("My Web Api v1");
5557
}
5658
```

src/NET6CustomLibrary/Docs/Swagger/README-SwaggerDateTimeJWTBearer.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ public void ConfigureServices(IServiceCollection services)
2424
2525
public void Configure(WebApplication app)
2626
{
27-
app.AddUseSwaggerUI("My Web Api v1");
27+
app.UseSwaggerUI("My Web Api v1");
28+
//OR app.UseSwaggerUINoEmptyRoutePrefix("My Web Api v1");
2829
}
2930
```
3031

@@ -51,6 +52,7 @@ public void ConfigureServices(IServiceCollection services)
5152
5253
public void Configure(WebApplication app)
5354
{
54-
app.AddUseSwaggerUI("My Web Api v1");
55+
app.UseSwaggerUI("My Web Api v1");
56+
//OR app.UseSwaggerUINoEmptyRoutePrefix("My Web Api v1");
5557
}
5658
```

src/NET6CustomLibrary/Docs/Swagger/README-SwaggerJWTBearer.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ public void ConfigureServices(IServiceCollection services)
2424
2525
public void Configure(WebApplication app)
2626
{
27-
app.AddUseSwaggerUI("My Web Api v1");
27+
app.UseSwaggerUI("My Web Api v1");
28+
//OR app.UseSwaggerUINoEmptyRoutePrefix("My Web Api v1");
2829
}
2930
```
3031

@@ -51,6 +52,7 @@ public void ConfigureServices(IServiceCollection services)
5152
5253
public void Configure(WebApplication app)
5354
{
54-
app.AddUseSwaggerUI("My Web Api v1");
55+
app.UseSwaggerUI("My Web Api v1");
56+
//OR app.UseSwaggerUINoEmptyRoutePrefix("My Web Api v1");
5557
}
5658
```

0 commit comments

Comments
 (0)