Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Generation: Plans to configure usage of Newtonsoft or System.Text.Json? #32

Closed
StefanOssendorf opened this issue Dec 7, 2020 · 4 comments
Labels
question Further information is requested

Comments

@StefanOssendorf
Copy link

Hi.

Are there any plans to modify the code generation to be able to switch between System.Text.Json or Newtonsoft as serializer?

Thanks in advance
Stefan

@unchase
Copy link
Owner

unchase commented Dec 14, 2020

The Connected Service based on NSwag:

Support for System.Text.Json
NSwag cannot fully support System.Text.Json because the library does not expose metadata to generate schemas. However we internally try to map System.Text.Json options to a custom Newtonsoft.JSON contract resolver which should cover most scenarios.

See this epic for more information: RicoSuter/NSwag#2243

@unchase unchase closed this as completed Dec 14, 2020
@StefanOssendorf
Copy link
Author

Thanks for the pointer :-)

@unchase unchase added the question Further information is requested label Jan 4, 2021
@StefanOssendorf
Copy link
Author

StefanOssendorf commented Sep 21, 2021

Hi @unchase. I know this is closed but I didn't want to open a duplicate. If you prefer a new one just say so and I'll copy my question there ;-).

Is STJ now supported? As far as I understand the linked issue from above it's in there for the client generation.

@unchase
Copy link
Owner

unchase commented Sep 21, 2021

Hi, @StefanOssendorf

You can track the current status here.
Once this is implemented on the library side, I'll add support to the extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants