forked from swagger-api/swagger-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
swagger-api#1424 forgot to add this test resource file
- Loading branch information
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
...es/swagger-jaxrs/src/test/java/io/swagger/resources/SimpleSelfReferencingSubResource.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,24 @@ | ||
package io.swagger.resources; | ||
|
||
|
||
|
||
import javax.ws.rs.GET; | ||
import javax.ws.rs.Path; | ||
import javax.ws.rs.Produces; | ||
|
||
@Produces({"application/xml"}) | ||
public class SimpleSelfReferencingSubResource { | ||
|
||
@Path("/sub") | ||
public SubResource getSubResource() { | ||
return new SubResource(); | ||
} | ||
|
||
// keep this test resource simple with just a single level of self-reference | ||
public static class SubResource { | ||
@GET | ||
public SubResource getSelf() { | ||
return this; | ||
} | ||
} | ||
} |