Replies: 1 comment 1 reply
-
OpenAPI uses the same JSON serialization options that Minimal APIs uses. If you're using MVC you'll need to configure the two sets of JSON options to match each other. There's no need to add additional options specific to OpenAPI. Or, explicitly annotate your models with JSON serialization attributes so they are always serialised the same way regardless of the settings. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Título: Add option to preserve property name casing in OpenAPI schema generation
Issue:
Currently OpenAPI schema generation converts property names to camelCase by default. There's no built-in way to preserve original property casing from C# classes.
Request:
Add configuration option to preserve original property casing when generating OpenAPI schemas, similar to how
JsonSerializerOptions.PropertyNamingPolicy = null
works for JSON serialization.Example:
Use case:
Maintaining consistent property casing between C# models and API documentation, especially important when working with systems that expect exact property name matches.
Beta Was this translation helpful? Give feedback.
All reactions