-
Notifications
You must be signed in to change notification settings - Fork 247
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 #944 from robbieaverill/fix-oneof-within-anyof
Fix bug where oneOf within anyOf would not be rendered in request schemas
- Loading branch information
Showing
4 changed files
with
219 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
openapi: 3.0.1 | ||
info: | ||
title: AnyOf Variations API | ||
description: Demonstrates various anyOf combinations. | ||
version: 1.0.0 | ||
tags: | ||
- name: anyOf | ||
description: anyOf tests | ||
paths: | ||
/anyof-primitives: | ||
get: | ||
tags: | ||
- anyOf | ||
summary: anyOf with primitives | ||
description: | | ||
Schema: | ||
```yaml | ||
anyOf: | ||
- type: string | ||
- type: integer | ||
- type: boolean | ||
``` | ||
responses: | ||
"200": | ||
description: Successful response | ||
content: | ||
application/json: | ||
schema: | ||
anyOf: | ||
- type: string | ||
- type: integer | ||
- type: boolean | ||
|
||
/anyof-oneof: | ||
get: | ||
tags: | ||
- anyOf | ||
summary: anyOf with oneOf | ||
description: | | ||
Schema: | ||
```yaml | ||
anyOf: | ||
- oneOf: | ||
- type: string | ||
- type: integer | ||
- type: boolean | ||
``` | ||
responses: | ||
"200": | ||
description: Successful response | ||
content: | ||
application/json: | ||
schema: | ||
anyOf: | ||
- oneOf: | ||
- type: string | ||
title: A string | ||
- type: integer | ||
title: An integer | ||
title: A string or integer | ||
- type: boolean | ||
title: A boolean | ||
title: A string or integer, or a boolean |
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