Open glassfishrobot opened 13 years ago
@glassfishrobot Commented Reported by abien
@glassfishrobot Commented @mpotociar said: Ad 1. The value of the @Path annotation should be derived from class / method name respectively
This is a good suggestion. However, there's a lot to agree upon yet:
Ad 2, 3. The default MediaType for @Consumes / @Produces should be MediaType.TEXT_PLAIN
There is a default value specified already and it would be BW incompatible to change it. I suggest we do not proceed with the proposed CoC in this area.
Ad 4. A single method (regardless of its name) in a resource / sub resource should be defaulted to a @GET request.
I'm a bit afraid of loosing some readability, but we may want to start experimenting with this in our implementations and see how users react to that. If the experiment proves to be successful, we may proceed with standardizing.
@glassfishrobot Commented @mpotociar said: Deferring for future release.
@glassfishrobot Commented ggam said: Related to point 2 and a more viable solution: #546
@glassfishrobot Commented Issue-Links: is duplicated by JAX_RS_SPEC-34 JAX_RS_SPEC-59 is related to JAX_RS_SPEC-18
@glassfishrobot Commented This issue was imported from java.net JIRA JAX_RS_SPEC-71
JAX-RS 2.0 should behave (Configuration by Exception / Convention over Configuration) like JPA 2 / EJB 3.2 / CDI APIs:
1. The value of the @Path annotation should be derived from class / method name respectively 2. The default MediaType for @Consumes / @Produces should be MediaType.TEXT_PLAIN 3. There is no need for the specification of @Consumes / @Produces in case 2. 4. A single method (regardless of its name) in a resource / sub resource should be defaulted to a @GET request. 5... [TBD]
But: HTTP methods (@GET, @POST, @PUT ...) must not be automatically derived from method names.
See also: #64
Affected Versions
[1.1]