-
Notifications
You must be signed in to change notification settings - Fork 18
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
Using a sealed interface as a property in a request body seem to fail with "missing constructor" #827
Comments
Retested with with micronaut 4.5.1 and micronaut-serde-jackson:2.10.1 - No change |
Please create an example. The correct way is to add |
No i am trying to get I have attached a project that is the bare minumum and that produces the same error: To trigger it, run the server and run simple
This will give the error It is highly likly that i just dont know how to use |
I see that i have used POST instead of PATCH here, but it should noe matter i think. Does it illuminate the problem? Can you reproduce it? I have retested with 2.11 (micronaut 4.6.1) and i see no change |
Issue description
I am not sure if this is a bug or if i am doing something stupid; but here goes.
First some dependecies:
I have created a PATCH endpoint which accepts a List of patch operations as its RequestBody:
A
PatchRequest
is a simple record where one of the properties, entity, is a sealed interface,Patchable
, that can be one of two types;PossibleEntityRequest1
orPossibleEntityRequest2
:Patchable
looks like this:PossibleEntityRequest1
andPossibleEntityRequest2
are the two possible entity-inputs that should be used when patching/updating an entity and is also just records with some data-propertiesWhen calling the endpoint, all i get is
I have tried using
on either the interface it self or on the entity property but i still get the same error.
Thoughs?
EDIT 12.06.2024
The text was updated successfully, but these errors were encountered: