You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+34Lines changed: 34 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,6 +56,40 @@ public class GetController : Controller2
56
56
57
57
5. After application started go to <http://localhost:5000/swagger/index.html> or <http://localhost:5000/swagger/v1/swagger.json> to see generated Swagger
58
58
59
+
## Configuration
60
+
61
+
### Bearer security scheme
62
+
63
+
When your controllers use authorization (`[Authorize]`), `Simplify.Web.Swagger` automatically adds security requirements to the corresponding operations using **all security schemes registered via `AddSecurityDefinition`** — no extra configuration needed:
x.AddSimplifyWebSwagger(); // Bearer requirement is added automatically
68
+
```
69
+
70
+
To restrict to a specific scheme name (e.g. when you have multiple definitions but want only one applied), set `SecuritySchemeName` explicitly:
71
+
72
+
```csharp
73
+
x.AddSimplifyWebSwagger(newSimplifyWebSwaggerArgs
74
+
{
75
+
SecuritySchemeName="Bearer"
76
+
});
77
+
```
78
+
79
+
### JSON property casing
80
+
81
+
By default, Swagger schema property names follow the `System.Text.Json` default casing (PascalCase). To use camelCase (matching `JsonSerializerDefaults.Web`), register a custom `ISerializerDataContractResolver`:
Copy file name to clipboardExpand all lines: src/Simplify.Web.Swagger/CHANGELOG.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,10 +2,24 @@
2
2
3
3
## [1.3.0] - Unreleased
4
4
5
+
### Added
6
+
7
+
- .NET 10.0 explicit support
8
+
-`AcceptLanguageHeaderArgs` — configures an `Accept-Language` header parameter added to all Swagger operations
9
+
-`SimplifyWebSwaggerArgs.AcceptLanguageHeader` — enables Accept-Language header with supported languages list
10
+
-`SimplifyWebSwaggerArgs.SecuritySchemeName` — explicit override for security scheme name; when `null` (default), all schemes registered via `AddSecurityDefinition` are applied automatically to authorized operations
11
+
- Route parameter types auto-detection from controller `Invoke`/`InvokeAsync` method signatures (typed path parameters in Swagger schema)
12
+
-`AddSimplifyWebSwaggerServices` extension method — registers PascalCase `ISerializerDataContractResolver` before `AddSwaggerGen`
13
+
14
+
### Changed
15
+
16
+
- Security requirements on authorized operations are now auto-detected from registered `AddSecurityDefinition` schemes; no manual `SecuritySchemeName` configuration needed
17
+
5
18
### Dependencies
6
19
7
20
- Simplify.Web bump to 5.2
8
21
- Asp.Versioning.Mvc bump to 8.1.1
22
+
- Swashbuckle.AspNetCore.SwaggerGen bump to 10.2.1 (net10.0)
0 commit comments