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

Implement discriminator of models #3599

Draft
wants to merge 23 commits into
base: main
Choose a base branch
from

Conversation

ArcturusZhang
Copy link
Member

@ArcturusZhang ArcturusZhang commented Jun 17, 2024

Fixes #3500

Depending on #3730

Check list:

  • base should be abstract, derived should not be abstract
  • initialization ctor of base should be protected
  • discriminator property should not appear in the initialization ctor of base
  • discriminator property should be assigned to its discriminator value in derived type
  • base model should have the deserializeProxy attribute
  • the serialization of base model should be delegated to the corresponding derived type
  • the deserialization of base model should be delegated to the corresponding derived type
  • there should be an unknown derived type to handle the unknown values for discriminator value

@azure-sdk
Copy link
Collaborator

API change check

APIView has identified API level changes in this PR and created following API reviews.

Microsoft.Generator.CSharp

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

Successfully merging this pull request may close these issues.

Implement discriminator for models
2 participants