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

[REQ] [csharp] Remove DataContract from model #19651

Open
yuxinbo opened this issue Sep 23, 2024 · 0 comments
Open

[REQ] [csharp] Remove DataContract from model #19651

yuxinbo opened this issue Sep 23, 2024 · 0 comments

Comments

@yuxinbo
Copy link

yuxinbo commented Sep 23, 2024

I want to inherit from Model generated by openapi generator, then I found the new property always null because it doesn't have DataMember attribute and since this Model is declared with DataContract attribute, it would serialize by DataContract & DataMember. This requires the inherit class also has DataMember attribute with new property. That isn't convenient to always ask used project to know this rule and it is better to let Web Application to config what is the serialize and deserialize rule for Json.

It is better to have the option to remove DataContract & DataMember attribute.

@yuxinbo yuxinbo changed the title [csharp] Remove DataContract from model [REQ] [csharp] Remove DataContract from model Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant