-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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 #21193 from phillip-kruger/auto-tag-abstract-class
OpenAPI: better auto tag when using interfaces / abstract classes
- Loading branch information
Showing
4 changed files
with
51 additions
and
2 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
14 changes: 14 additions & 0 deletions
14
...loyment/src/test/java/io/quarkus/smallrye/openapi/test/jaxrs/AbstractAutoTagResource.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,14 @@ | ||
package io.quarkus.smallrye.openapi.test.jaxrs; | ||
|
||
import javax.ws.rs.GET; | ||
import javax.ws.rs.Path; | ||
import javax.ws.rs.PathParam; | ||
import javax.ws.rs.Produces; | ||
import javax.ws.rs.core.MediaType; | ||
|
||
@Produces(MediaType.TEXT_PLAIN) | ||
public interface AbstractAutoTagResource<T> { | ||
@GET | ||
@Path("/{id}") | ||
T getById(@PathParam("id") long id); | ||
} |
11 changes: 11 additions & 0 deletions
11
...napi/deployment/src/test/java/io/quarkus/smallrye/openapi/test/jaxrs/AutoTagResource.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,11 @@ | ||
package io.quarkus.smallrye.openapi.test.jaxrs; | ||
|
||
import javax.ws.rs.Path; | ||
|
||
@Path("/address") | ||
public class AutoTagResource implements AbstractAutoTagResource<String> { | ||
@Override | ||
public String getById(long id) { | ||
return "Disney Land, Gate " + id; | ||
} | ||
} |
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