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

Deserialization features don't work #11429

Open
TbirdDuncan opened this issue Dec 11, 2024 · 1 comment
Open

Deserialization features don't work #11429

TbirdDuncan opened this issue Dec 11, 2024 · 1 comment

Comments

@TbirdDuncan
Copy link

TbirdDuncan commented Dec 11, 2024

Expected Behavior

Found during migration from micronaut 3.x.x to 4.x.x. Before hand the config wasn't even needed to ignore enums that were unknown.
The following config:

jackson:
  serialization-inclusion: NON_NULL
  deserialization:
    READ_UNKNOWN_ENUM_VALUES_AS_NULL: true
    ```
should make it so that unknown enum values in a request come back as null

### Actual Behaviour

io.micronaut.core.convert.exceptions.ConversionErrorException: Failed to convert argument [<arg>] for value [<value>] due to: No enum constant <enum.value>
	at io.micronaut.web.router.AbstractRouteMatch.failOnConversionErrors(AbstractRouteMatch.java:419)

### Steps To Reproduce

Make a micronaut app
create a get controller which utilizes @QueryValue and takes an enum as a dto 
send request with something not related to enum


### Environment Information

Mac: Sonoma 14.7 (23H124)
jdk 21

### Example Application

_No response_

### Version

4.5.1
@TbirdDuncan
Copy link
Author

I believe this is tied to the issue: #10298

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

No branches or pull requests

1 participant