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
1 changed files with 6 additions and 0 deletions

View File

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