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
Java records cannot be used for request beans with @PathVariable #8295
Comments
@sdelamo @dstepanov Any help with this issue? Thanks! |
@dstepanov the MissingParameterRule patch is a bit weird, the properties returned by getBeanProperties don't include annotations. Should they? Fixes #8295
thanks for the report! will be fixed in 3.8 |
Thanks for the quick turnaround! This will be super nice to use! |
@yawkat Is this fix available in 3.8.0-SNAPSHOT? I recently picked a project back up that was trying to use it, and appear to be having issues with using
This occurs when I Thanks! |
@dstepanov @sdelamo Are you able to take a look at the comment above? Thanks and sorry for the trouble! |
I opened #8551. Thanks! |
Expected Behavior
I expect to be able to use Java records with
@RequestBean
and@PathVariable
for API endpoints in the same way that I can declare a POJO.Actual Behaviour
Instead, I get the following compilation error:
Steps To Reproduce
java: The route declares a uri variable named [id], but no corresponding method argument is present
Environment Information
OpenJDK Runtime Environment (build 20-ea+21-1545)
OpenJDK 64-Bit Server VM (build 20-ea+21-1545, mixed mode, sharing)
Example Application
https://github.com/lbkulinski/record_bug_example
Version
3.7.3
The text was updated successfully, but these errors were encountered: