-
-
Notifications
You must be signed in to change notification settings - Fork 347
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(msw): return mock as array of enums if array is the correct type (#…
…1272) Co-authored-by: Alfred Jonsson <[email protected]>
- Loading branch information
1 parent
ee01104
commit 150f49e
Showing
3 changed files
with
148 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
openapi: 3.0.3 | ||
info: | ||
title: Arrays | ||
version: 1.0.0 | ||
paths: | ||
/api/cat: | ||
get: | ||
summary: sample cat | ||
responses: | ||
'200': | ||
description: OK | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Cat' | ||
/api/required-cat: | ||
get: | ||
summary: sample required cat | ||
responses: | ||
'200': | ||
description: OK | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/RequiredCat' | ||
/api/dog: | ||
get: | ||
summary: sample dog | ||
responses: | ||
'200': | ||
description: OK | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Dog' | ||
/api/required-dog: | ||
get: | ||
summary: sample required dog | ||
responses: | ||
'200': | ||
description: OK | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/RequiredDog' | ||
/api/duck: | ||
get: | ||
summary: sample duck | ||
responses: | ||
'200': | ||
description: OK | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Duck' | ||
components: | ||
schemas: | ||
Siamese: | ||
type: object | ||
properties: | ||
colours: | ||
type: array | ||
items: | ||
type: string | ||
enum: | ||
- BLACK | ||
- BROWN | ||
- WHITE | ||
- GREY | ||
RequiredSiamese: | ||
type: object | ||
required: ['colours'] | ||
properties: | ||
colours: | ||
type: array | ||
items: | ||
type: string | ||
enum: | ||
- BLACK | ||
- BROWN | ||
- WHITE | ||
- GREY | ||
Cat: | ||
type: object | ||
properties: | ||
petsRequested: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/Siamese' | ||
RequiredCat: | ||
type: object | ||
properties: | ||
petsRequested: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/RequiredSiamese' | ||
Bulldog: | ||
type: object | ||
properties: | ||
colour: | ||
type: string | ||
enum: | ||
- BLACK | ||
- BROWN | ||
RequiredBulldog: | ||
type: object | ||
required: ['colour'] | ||
properties: | ||
colour: | ||
type: string | ||
enum: | ||
- BLACK | ||
- BROWN | ||
Dog: | ||
type: object | ||
properties: | ||
petsRequested: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/Bulldog' | ||
RequiredDog: | ||
type: object | ||
properties: | ||
petsRequested: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/RequiredBulldog' | ||
Duck: | ||
type: object | ||
properties: | ||
petsRequested: | ||
type: array | ||
items: | ||
type: string |