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

Add a descriptor kind for JsonContentPolymorphicSerializer #2697

Open
kunyavskiy opened this issue Jun 2, 2024 · 0 comments
Open

Add a descriptor kind for JsonContentPolymorphicSerializer #2697

kunyavskiy opened this issue Jun 2, 2024 · 0 comments

Comments

@kunyavskiy
Copy link

What is your use-case and why do you need this feature?

When you use JsonContentPolymorphicSerializer, it's impossible to specify a list of shapes you expect, while it's still useful for schema exporing.

Describe the solution you'd like

Probably, it should be a new descriptorKind in PolymorficKind and some utility function like

buildContentBasedDescriptor(options: List<SerialDescriptor>

to build it.

sandwwraith added a commit that referenced this issue Aug 7, 2024
This API has been around for a long time and has proven itself useful. The main reason @ExperimentalSerializationApi was on SerialDescriptor's properties is that we wanted to discourage people from subclassing it. With the introduction of @SubclassOptInRequired (#2366), we can do this without the need of marking everything with experimental.

Serial kinds fall into the same category with only exception in PolymorphicKind. There are plenty requests for functionality like creating a custom sealed-like descriptor (#2697, #2721, #1865) which may require additional kinds in the future.
qwwdfsad pushed a commit that referenced this issue Aug 26, 2024
This API has been around for a long time and has proven itself useful. The main reason @ExperimentalSerializationApi was on SerialDescriptor's properties is that we wanted to discourage people from subclassing it. With the introduction of @SubclassOptInRequired (#2366), we can do this without the need of marking everything with experimental.

Serial kinds fall into the same category with only exception in PolymorphicKind. There are plenty requests for functionality like creating a custom sealed-like descriptor (#2697, #2721, #1865) which may require additional kinds in the future.
sandwwraith added a commit that referenced this issue Aug 27, 2024
This API has been around for a long time and has proven itself useful. The main reason @ExperimentalSerializationApi was on SerialDescriptor's properties is that we wanted to discourage people from subclassing it. With the introduction of @SubclassOptInRequired (#2366), we can do this without the need of marking everything with experimental.

Serial kinds fall into the same category with only exception in PolymorphicKind. There are plenty requests for functionality like creating a custom sealed-like descriptor (#2697, #2721, #1865) which may require additional kinds in the future.
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

2 participants