Merge pull request #3 from prateekmedia/patch-1

[FIX] Add Discriminator
This commit is contained in:
Kavin 2023-06-09 19:58:25 +01:00 committed by GitHub
commit 6652b1fa9b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -872,6 +872,12 @@ components:
description: The number of videos in the playlist. description: The number of videos in the playlist.
SearchItem: SearchItem:
type: object type: object
discriminator:
propertyName: type
mapping:
stream: "#/components/schemas/StreamItem"
channel: "#/components/schemas/ChannelItem"
playlist: "#/components/schemas/PlaylistItem"
oneOf: oneOf:
- $ref: "#/components/schemas/StreamItem" - $ref: "#/components/schemas/StreamItem"
- $ref: "#/components/schemas/ChannelItem" - $ref: "#/components/schemas/ChannelItem"