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
{{ message }}
This repository was archived by the owner on Jul 6, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Jul 6, 2026. It is now read-only.
Support Generating Serialization Type with Swagger consumes and produces #2030
At the time of writing, serialization support is based on the properties of the Swagger definitions, where if the definition has an xml node it'll generate with XML serialization otherwise it will be generated with JSON serialization. This leaves a gap where if the model is used in multiple serialization formats it will only generate supporting one format or another. But it's possible to determine all serialization formats a model will be used in by determining which API definitions the model is used in and inspecting the consumes and produces of those API definitions. For example, if a model is used as part of the request in APIs with application/json and application/xmlconsumes it's known that the model will need to support both JSON and XML serialization.
Closing as this should be resolved now and models are generated based on those properties, allowing a single model to support many types of serialization.
Activity
alzimmermsft commentedon Nov 7, 2025
Closing as this should be resolved now and models are generated based on those properties, allowing a single model to support many types of serialization.