Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [rest-dev] [External] : Re: Jakarta Rest 3.2?

On Tue, Jan 16, 2024 at 9:53 AM Jan Supol <jan.supol@xxxxxxxxxx> wrote:
  • 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,, 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.

1. We could stick with this from the 4.0 spec and require the @Body annotations
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.


James R. Perkins
JBoss by Red Hat

Back to the top