Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #14897
Closed
Open
Issue created Mar 07, 2023 by Administrator@rootContributor

[REQ] [csharp-netcore] Support the System.Text.Json source generator.

Created by: teo-tsirpanis

Is your feature request related to a problem? Please describe.

The modes of the csharp-netcore generator that support System.Text.Json use the JsonSerializer methods that perform reflection, making the generated client code incompatible with trimming and AOT.

Describe the solution you'd like

The generator should emit a partial class deriving from JsonSerializerContext and decorated with [JsonSerializable] attributes, that will allow the System.Text.Json source generator to emit the serialization logic at compile time, and then pass this context to a suitable JsonSerializer method. We might need an opt-in or opt-out switch, in case there are any incompatibilities.

Describe alternatives you've considered

There are no supported alternatives.

Assignee
Assign to
Time tracking