Skip to content
This repository was archived by the owner on Jul 6, 2026. It is now read-only.
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

Closed

Description

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/xml consumes it's known that the model will need to support both JSON and XML serialization.

Activity

  1. alzimmermsft commented on Nov 7, 2025

    @alzimmermsft
    MemberAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestThis issue requires a new behavior in the product in order be resolved.v4

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions