-
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.
allow siblings in request body schemas OAS 3.1 resolving
- Loading branch information
Showing
6 changed files
with
100 additions
and
7 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
47 changes: 47 additions & 0 deletions
47
...gger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/SiblingsResourceRequestBody.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,47 @@ | ||
package io.swagger.v3.jaxrs2.resources; | ||
|
||
import io.swagger.v3.jaxrs2.resources.siblings.PetSimple; | ||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.media.Content; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import io.swagger.v3.oas.annotations.parameters.RequestBody; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponse; | ||
|
||
import javax.ws.rs.GET; | ||
import javax.ws.rs.Path; | ||
import javax.ws.rs.core.Response; | ||
|
||
@Path("/test") | ||
public class SiblingsResourceRequestBody { | ||
@Path("/bodyimpl") | ||
@GET | ||
@Operation( | ||
requestBody = | ||
@RequestBody( | ||
description = "aaa", | ||
content = { | ||
@Content( | ||
mediaType = "application/json", | ||
schema = @Schema( | ||
description = "resource pet", | ||
implementation = PetSimple.class, | ||
accessMode = Schema.AccessMode.WRITE_ONLY)) | ||
})) | ||
public Response getBodyImpl(Object body) { | ||
return null; | ||
} | ||
|
||
@Path("/bodyimplparam") | ||
@GET | ||
public Response getBodyImplParam(@RequestBody( | ||
content = { | ||
@Content( | ||
mediaType = "*/*", | ||
schema = @Schema( | ||
description = "resource pet", | ||
implementation = PetSimple.class, | ||
accessMode = Schema.AccessMode.WRITE_ONLY)) | ||
}) Object body) { | ||
return null; | ||
} | ||
} |
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