From 92d1a99f763d42ca4b79fa5779c40ece8532a7c0 Mon Sep 17 00:00:00 2001 From: Prateek Sunal Date: Mon, 5 Jun 2023 19:34:31 +0530 Subject: [PATCH] fix: oneOf in bindings --- swagger.yaml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/swagger.yaml b/swagger.yaml index b4a8129..bca90be 100644 --- a/swagger.yaml +++ b/swagger.yaml @@ -685,7 +685,7 @@ components: type: type: string description: The type of the stream item. Always stream. - example: stream + const: stream duration: type: integer description: The duration of the video in seconds. @@ -829,7 +829,7 @@ components: type: type: string description: The type of the channel item. Always channel. - example: channel + const: channel description: type: string description: The description of the channel. @@ -857,7 +857,7 @@ components: type: type: string description: The type of the playlist item. Always playlist. - example: playlist + const: playlist name: type: string description: The name of the playlist. @@ -872,6 +872,11 @@ components: description: The number of videos in the playlist. SearchItem: type: object + discriminator: + propertyName: type + properties: + type: + type: string oneOf: - $ref: "#/components/schemas/StreamItem" - $ref: "#/components/schemas/ChannelItem"