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
Inadditiontothe `[JsonPropertyName]` attribute, theconfiguration(`SchemaGeneratorConfiguration`)exposesa `PropertyNameResolver` delegatethat allows you to define a custom method for altering property names from your code into the schema. The system will adjust property names accordingly.
274
274
275
-
- `camelCase`
276
-
- `PascalCase`
277
-
- `kebab-case`
278
-
- `UPPER-KEBAB-CASE`
279
-
- `snake_case`
280
-
- `UPPER_SNAKE_CASE`
275
+
```C#
276
+
SchemaGeneratorConfiguration config = new()
277
+
{
278
+
// All property names will be lowercase!
279
+
PropertyNameResolver=x=>x.Name.ToLower()
280
+
};
281
+
```
282
+
283
+
The `PropertyNameResolvers` staticclassdefinesafewcommonly-usedconventions:
0 commit comments