Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Ambiguous Resource Methods in TCK, airlines UserResource #557

Closed
aubi opened this issue Feb 8, 2023 · 1 comment · Fixed by #559
Closed

Question: Ambiguous Resource Methods in TCK, airlines UserResource #557

aubi opened this issue Feb 8, 2023 · 1 comment · Fixed by #559
Labels

Comments

@aubi
Copy link
Contributor

aubi commented Feb 8, 2023

In UserResource, two methods have the same path (e.g. refusing to deploy):

    @GET
    @Path("/{username}")
...
    public Response getUserByName(

and

    @GET
    @Path("/{id}")
...
    public Response getUserById(

The only difference is, that getUserById defines the parameter as int, while the first as String.

Is the path parameter type enough to distinguish the methods? So if the parameter is convertible to int, use getUserById; use getUserByName otherwise? To me it seems wrong, because getUserByName will never work for username made from digits.

@Azquelt
Copy link
Member

Azquelt commented Feb 13, 2023

Huh, I hadn't noticed this and I'm not sure if it's valid - would need to check the Jakarta RESTful WS spec for that - but it at least seems unnecessary to test something so confusing here.

Before changing it or removing one of the methods, we'd have to go through and check if any tests are expecting these entries to be present and update or remove those tests.

@MikeEdgar MikeEdgar added this to the MP OpenAPI 3.1.1 milestone Apr 13, 2023
@MikeEdgar MikeEdgar added the tck label May 15, 2023
This was referenced Oct 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants