-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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 #2819 from swagger-api/ticket-2818
refs #2818 - fix @parameter type/format resolving
- Loading branch information
Showing
3 changed files
with
64 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
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
35 changes: 35 additions & 0 deletions
35
modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Ticket2818Resource.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,35 @@ | ||
package io.swagger.v3.jaxrs2.resources; | ||
|
||
import io.swagger.v3.oas.annotations.Parameter; | ||
import io.swagger.v3.oas.annotations.enums.ParameterIn; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
|
||
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; | ||
|
||
@Path("/bookstore") | ||
public class Ticket2818Resource { | ||
|
||
@Produces({ MediaType.APPLICATION_JSON }) | ||
@Path("/{id}") | ||
@GET | ||
public Book getBook( | ||
@Parameter( | ||
in = ParameterIn.PATH, | ||
schema = @Schema ( | ||
type = "integer", | ||
format = "int32" | ||
) | ||
) | ||
@PathParam("id") int id) { | ||
return new Book(); | ||
} | ||
|
||
|
||
public static class Book { | ||
public String foo; | ||
} | ||
} |