Skip to content
This repository was archived by the owner on Feb 12, 2022. It is now read-only.

Method name clash when dealing with path parameters #314

Closed
DavideRossi opened this issue Oct 19, 2017 · 3 comments
Closed

Method name clash when dealing with path parameters #314

DavideRossi opened this issue Oct 19, 2017 · 3 comments

Comments

@DavideRossi
Copy link

DavideRossi commented Oct 19, 2017

Two resources with the following paths:

/foo:
    /bar:
        get:
    /bar/{id}:
        get:

generate two methods with the same signature:

@GET
@Path("/foo/bar/{id}")   // or @Path("/foo/bar") for the first resource 
@Produces("application/json")
GetBazFooBarResponse getBazFooBar();

To me that is related to #313 since the application of the path parameters in the methods would lead to different signatures (and no clashing).

I'm using the maven plugin (v 2.1.0).

@jpbelang
Copy link
Contributor

I'll check why this breaks without parameters.

@amagnus
Copy link
Contributor

amagnus commented Dec 1, 2017

@DavideRossi I had a similar issue, and fixed by adding uriParameters, like the following:

/foo:
    /bar:
        get:
    /bar/{id}:
      uriParameters:
        id:
          type: string
      get:

jpbelang added a commit that referenced this issue Jan 26, 2018
@jpbelang
Copy link
Contributor

Fixed in release/2.2.0

jpbelang added a commit that referenced this issue Jan 26, 2018
Forgot to add second example
@jstoiko jstoiko closed this as completed Mar 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants