- IMO we could, probably should, keep the CDI support in so users have something to migrate to with the deprecation of @Context. We should keep the issue of making the resource annotations stereotypes, https://github.com/jakartaee/rest/issues/952,
and have TCK tests which validate that the required types can be injected via CDI.
This sounds like both @Context and @Body should be supported. That's basically 4.0 with additional (deprecated) @Context preserved. That is not what is proposed, right?
Thank you Jan, this is a really good point. In my opinion we have a few options.
2. We could support both. If possible, not sure on this, we could require implementations to log a warning if the @Body annotation is not used. Effectively supporting both the old and new options
3. We could just wait for 4.0 to support this.
Doing option 1 would be a backwards compatibility issue and really one of the main reasons for this 3.2 option is to not have backwards compatibility issues.
I don't really know if option 2 is really an option. However, if the @Body annotation is available, I will say in RESTEasy we could do this option. This option does seem doable given this text in the specification:
"Resource methods MUST have at most one entity parameter."
The third option is obviously the easiest, but doesn't allow for a nice migration from 3.2 to 4.0.