Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-634

Support for fake path parameters in RESTeasy client

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Out of Date
    • Affects Version/s: 2.3-RC1
    • Fix Version/s: None
    • Component/s: None

      Description

      I use RESTeasy for server and client. Client shares this service interface with server:

      public interface Service {
          @Path("/start")
          @GET
          void start();
      }
      

      Implementation of this service is bound to path /api, so method start() is accessible on full path /api/start. On client side is code pretty straightforward:

      RegisterBuiltin.register(ResteasyProviderFactory.getInstance());
      Service service = ProxyFactory.create(Service.class, "http://server/api");
      service.start();
      

      I want to have path case insensitive, so I use fake path parameter with regular expression in it:

      public interface Service {
          @Path("/{start:[Ss]tart}")
          @GET
          void start();
      }
      

      Now ProxyFactory on client doesn't know value for substitution path parameter

      {start}

      and client ends with exception "You did not supply enough values to fill path parameters". But when i try to use path parameter as method argument, it works.

      public interface Service {
          @Path("/{start:[Ss]tart}")
          @GET
          void start(@PathParam("start") String param);
      }
      

      There is no simple solution for handling those fake path parameters in RESTeasy client, or I missed something? Thanks.

        Attachments

          Activity

            People

            Assignee:
            patriot1burke@gmail.com Bill Burke (Inactive)
            Reporter:
            mschayna_jira Martin Schayna (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: