Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-10886

JAX-RS validation returns false errors when method has multiple pathparams with regexp

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • 3.3.0.Beta3
    • 3.3.0.M5
    • webservices
    • None
    • Hide

      In a JAX-RS enabled project, have a method with the following signature:

      @GET
      @Path("/user/{id}/{format:(/format/[^/]+?)?}/{encoding:(/encoding/[^/]+?)?}")
      public Response getContent(@PathParam("id") int id,
      			  @PathParam("format") String format,
      			  @PathParam("encoding") String encoding, 
      			  @QueryParam("start") int start) {
      	...
      }
      

      The JAX-RS validation returns an errors. Removing the regexp in the @Path annotation fixes the validation.

      Show
      In a JAX-RS enabled project, have a method with the following signature: @GET @Path( "/user/{id}/{format:(/format/[^/]+?)?}/{encoding:(/encoding/[^/]+?)?}" ) public Response getContent(@PathParam( "id" ) int id, @PathParam( "format" ) String format, @PathParam( "encoding" ) String encoding, @QueryParam( "start" ) int start) { ... } The JAX-RS validation returns an errors. Removing the regexp in the @Path annotation fixes the validation.

    Attachments

      Activity

        People

          xcoulon@redhat.com Xavier Coulon
          xcoulon@redhat.com Xavier Coulon
          Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

            Created:
            Updated:
            Resolved: