-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1203 from MikeEdgar/issue-1201
Include overridden methods/classes in JAX-RS resource method scan
- Loading branch information
Showing
7 changed files
with
252 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
...va/test/io/smallrye/openapi/runtime/scanner/jakarta/ParameterDefaultValueInheritance.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package test.io.smallrye.openapi.runtime.scanner.jakarta; | ||
|
||
import jakarta.ws.rs.DefaultValue; | ||
import jakarta.ws.rs.GET; | ||
import jakarta.ws.rs.Path; | ||
import jakarta.ws.rs.Produces; | ||
import jakarta.ws.rs.QueryParam; | ||
import jakarta.ws.rs.core.MediaType; | ||
|
||
public class ParameterDefaultValueInheritance { | ||
|
||
public static final Class<?>[] CLASSES = { | ||
InterfaceAlpha.class, | ||
InterfaceBeta.class, | ||
Resource1.class | ||
}; | ||
|
||
interface InterfaceAlpha { | ||
@GET | ||
@Path("/alpha") | ||
@Produces(MediaType.TEXT_PLAIN) | ||
String getAlpha(@DefaultValue("1") @QueryParam("omega") int omega); | ||
} | ||
|
||
@Produces(MediaType.TEXT_XML) | ||
interface InterfaceBeta extends InterfaceAlpha { | ||
@Override | ||
@GET | ||
@Path("/alpha") | ||
@Produces(MediaType.TEXT_PLAIN) | ||
String getAlpha(@DefaultValue("10") @QueryParam("omega") int omega); | ||
|
||
@GET | ||
@Path("/beta") | ||
String getBeta(@DefaultValue("true") @QueryParam("upsilon") boolean upsilon); | ||
} | ||
|
||
@Path("/1") | ||
static class Resource1 implements InterfaceBeta { | ||
@Override | ||
public String getAlpha(int omega) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public String getBeta(@DefaultValue("false") @QueryParam("upsilon") boolean upsilon) { | ||
return null; | ||
} | ||
} | ||
} |
Oops, something went wrong.