-
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.
enhance OAS 3.1 resolving and allow siblings in response schemas
- Loading branch information
Showing
8 changed files
with
195 additions
and
9 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
51 changes: 51 additions & 0 deletions
51
...s/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/SiblingsResourceSimple.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,51 @@ | ||
package io.swagger.v3.jaxrs2.resources; | ||
|
||
import io.swagger.v3.jaxrs2.resources.siblings.Pet; | ||
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.responses.ApiResponse; | ||
|
||
import javax.ws.rs.GET; | ||
import javax.ws.rs.Path; | ||
|
||
@Path("/test") | ||
public class SiblingsResourceSimple { | ||
@GET | ||
@Operation( | ||
responses = { | ||
@ApiResponse( | ||
responseCode = "300", | ||
description = "aaa", | ||
useReturnTypeSchema = true, | ||
content = { | ||
@Content( | ||
mediaType = "*/*", | ||
schema = @Schema( | ||
description = "resource pet", | ||
accessMode = Schema.AccessMode.READ_ONLY)) | ||
})}) | ||
public PetSimple getCart() { | ||
return null; | ||
} | ||
|
||
@Path("/impl") | ||
@GET | ||
@Operation( | ||
responses = { | ||
@ApiResponse( | ||
responseCode = "300", | ||
description = "aaa", | ||
content = { | ||
@Content( | ||
mediaType = "*/*", | ||
schema = @Schema( | ||
description = "resource pet", | ||
implementation = PetSimple.class, | ||
accessMode = Schema.AccessMode.READ_ONLY)) | ||
})}) | ||
public PetSimple getCartImpl() { | ||
return null; | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/siblings/PetSimple.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,8 @@ | ||
package io.swagger.v3.jaxrs2.resources.siblings; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
|
||
@Schema(description = "Pet") | ||
public class PetSimple { | ||
|
||
} |
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