Skip to content

Commit

Permalink
chore(examples): fix incorrect mapping in BotAPI spec
Browse files Browse the repository at this point in the history
  • Loading branch information
tdakkota committed Nov 16, 2022
1 parent d0efe6b commit 172e634
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 79 deletions.
82 changes: 41 additions & 41 deletions _testdata/examples/gotd_bot_api.json
Original file line number Diff line number Diff line change
Expand Up @@ -2208,13 +2208,13 @@
"discriminator": {
"propertyName": "type",
"mapping": {
"all_chat_administrators": "BotCommandScopeAllChatAdministrators",
"all_group_chats": "BotCommandScopeAllGroupChats",
"all_private_chats": "BotCommandScopeAllPrivateChats",
"chat": "BotCommandScopeChat",
"chat_administrators": "BotCommandScopeChatAdministrators",
"chat_member": "BotCommandScopeChatMember",
"default": "BotCommandScopeDefault"
"all_chat_administrators": "#/components/schemas/BotCommandScopeAllChatAdministrators",
"all_group_chats": "#/components/schemas/BotCommandScopeAllGroupChats",
"all_private_chats": "#/components/schemas/BotCommandScopeAllPrivateChats",
"chat": "#/components/schemas/BotCommandScopeChat",
"chat_administrators": "#/components/schemas/BotCommandScopeChatAdministrators",
"chat_member": "#/components/schemas/BotCommandScopeChatMember",
"default": "#/components/schemas/BotCommandScopeDefault"
}
}
},
Expand Down Expand Up @@ -3499,19 +3499,19 @@
"discriminator": {
"propertyName": "type",
"mapping": {
"article": "InlineQueryResultArticle",
"audio": "InlineQueryResultAudio",
"contact": "InlineQueryResultContact",
"document": "InlineQueryResultDocument",
"game": "InlineQueryResultGame",
"gif": "InlineQueryResultGif",
"location": "InlineQueryResultLocation",
"mpeg4_gif": "InlineQueryResultMpeg4Gif",
"photo": "InlineQueryResultPhoto",
"sticker": "InlineQueryResultCachedSticker",
"venue": "InlineQueryResultVenue",
"video": "InlineQueryResultVideo",
"voice": "InlineQueryResultVoice"
"article": "#/components/schemas/InlineQueryResultArticle",
"audio": "#/components/schemas/InlineQueryResultAudio",
"contact": "#/components/schemas/InlineQueryResultContact",
"document": "#/components/schemas/InlineQueryResultDocument",
"game": "#/components/schemas/InlineQueryResultGame",
"gif": "#/components/schemas/InlineQueryResultGif",
"location": "#/components/schemas/InlineQueryResultLocation",
"mpeg4_gif": "#/components/schemas/InlineQueryResultMpeg4Gif",
"photo": "#/components/schemas/InlineQueryResultPhoto",
"sticker": "#/components/schemas/InlineQueryResultCachedSticker",
"venue": "#/components/schemas/InlineQueryResultVenue",
"video": "#/components/schemas/InlineQueryResultVideo",
"voice": "#/components/schemas/InlineQueryResultVoice"
}
}
},
Expand Down Expand Up @@ -4941,11 +4941,11 @@
"discriminator": {
"propertyName": "type",
"mapping": {
"animation": "InputMediaAnimation",
"audio": "InputMediaAudio",
"document": "InputMediaDocument",
"photo": "InputMediaPhoto",
"video": "InputMediaVideo"
"animation": "#/components/schemas/InputMediaAnimation",
"audio": "#/components/schemas/InputMediaAudio",
"document": "#/components/schemas/InputMediaDocument",
"photo": "#/components/schemas/InputMediaPhoto",
"video": "#/components/schemas/InputMediaVideo"
}
}
},
Expand Down Expand Up @@ -5496,9 +5496,9 @@
"discriminator": {
"propertyName": "type",
"mapping": {
"commands": "MenuButtonCommands",
"default": "MenuButtonDefault",
"web_app": "MenuButtonWebApp"
"commands": "#/components/schemas/MenuButtonCommands",
"default": "#/components/schemas/MenuButtonDefault",
"web_app": "#/components/schemas/MenuButtonWebApp"
}
}
},
Expand Down Expand Up @@ -5949,15 +5949,15 @@
"discriminator": {
"propertyName": "type",
"mapping": {
"data": "PassportElementErrorDataField",
"file": "PassportElementErrorFile",
"files": "PassportElementErrorFiles",
"front_side": "PassportElementErrorFrontSide",
"reverse_side": "PassportElementErrorReverseSide",
"selfie": "PassportElementErrorSelfie",
"translation_file": "PassportElementErrorTranslationFile",
"translation_files": "PassportElementErrorTranslationFiles",
"unspecified": "PassportElementErrorUnspecified"
"data": "#/components/schemas/PassportElementErrorDataField",
"file": "#/components/schemas/PassportElementErrorFile",
"files": "#/components/schemas/PassportElementErrorFiles",
"front_side": "#/components/schemas/PassportElementErrorFrontSide",
"reverse_side": "#/components/schemas/PassportElementErrorReverseSide",
"selfie": "#/components/schemas/PassportElementErrorSelfie",
"translation_file": "#/components/schemas/PassportElementErrorTranslationFile",
"translation_files": "#/components/schemas/PassportElementErrorTranslationFiles",
"unspecified": "#/components/schemas/PassportElementErrorUnspecified"
}
}
},
Expand Down Expand Up @@ -9304,10 +9304,10 @@
"discriminator": {
"propertyName": "type",
"mapping": {
"audio": "InputMediaAudio",
"document": "InputMediaDocument",
"photo": "InputMediaPhoto",
"video": "InputMediaVideo"
"audio": "#/components/schemas/InputMediaAudio",
"document": "#/components/schemas/InputMediaDocument",
"photo": "#/components/schemas/InputMediaPhoto",
"video": "#/components/schemas/InputMediaVideo"
}
}
}
Expand Down
76 changes: 38 additions & 38 deletions _testdata/examples/telegram_bot_api.json
Original file line number Diff line number Diff line change
Expand Up @@ -2092,13 +2092,13 @@
"discriminator": {
"propertyName": "type",
"mapping": {
"all_chat_administrators": "BotCommandScopeAllChatAdministrators",
"all_group_chats": "BotCommandScopeAllGroupChats",
"all_private_chats": "BotCommandScopeAllPrivateChats",
"chat": "BotCommandScopeChat",
"chat_administrators": "BotCommandScopeChatAdministrators",
"chat_member": "BotCommandScopeChatMember",
"default": "BotCommandScopeDefault"
"all_chat_administrators": "#/components/schemas/BotCommandScopeAllChatAdministrators",
"all_group_chats": "#/components/schemas/BotCommandScopeAllGroupChats",
"all_private_chats": "#/components/schemas/BotCommandScopeAllPrivateChats",
"chat": "#/components/schemas/BotCommandScopeChat",
"chat_administrators": "#/components/schemas/BotCommandScopeChatAdministrators",
"chat_member": "#/components/schemas/BotCommandScopeChatMember",
"default": "#/components/schemas/BotCommandScopeDefault"
}
}
},
Expand Down Expand Up @@ -3318,19 +3318,19 @@
"discriminator": {
"propertyName": "type",
"mapping": {
"article": "InlineQueryResultArticle",
"audio": "InlineQueryResultAudio",
"contact": "InlineQueryResultContact",
"document": "InlineQueryResultDocument",
"game": "InlineQueryResultGame",
"gif": "InlineQueryResultGif",
"location": "InlineQueryResultLocation",
"mpeg4_gif": "InlineQueryResultMpeg4Gif",
"photo": "InlineQueryResultPhoto",
"sticker": "InlineQueryResultCachedSticker",
"venue": "InlineQueryResultVenue",
"video": "InlineQueryResultVideo",
"voice": "InlineQueryResultVoice"
"article": "#/components/schemas/InlineQueryResultArticle",
"audio": "#/components/schemas/InlineQueryResultAudio",
"contact": "#/components/schemas/InlineQueryResultContact",
"document": "#/components/schemas/InlineQueryResultDocument",
"game": "#/components/schemas/InlineQueryResultGame",
"gif": "#/components/schemas/InlineQueryResultGif",
"location": "#/components/schemas/InlineQueryResultLocation",
"mpeg4_gif": "#/components/schemas/InlineQueryResultMpeg4Gif",
"photo": "#/components/schemas/InlineQueryResultPhoto",
"sticker": "#/components/schemas/InlineQueryResultCachedSticker",
"venue": "#/components/schemas/InlineQueryResultVenue",
"video": "#/components/schemas/InlineQueryResultVideo",
"voice": "#/components/schemas/InlineQueryResultVoice"
}
}
},
Expand Down Expand Up @@ -4777,11 +4777,11 @@
"discriminator": {
"propertyName": "type",
"mapping": {
"animation": "InputMediaAnimation",
"audio": "InputMediaAudio",
"document": "InputMediaDocument",
"photo": "InputMediaPhoto",
"video": "InputMediaVideo"
"animation": "#/components/schemas/InputMediaAnimation",
"audio": "#/components/schemas/InputMediaAudio",
"document": "#/components/schemas/InputMediaDocument",
"photo": "#/components/schemas/InputMediaPhoto",
"video": "#/components/schemas/InputMediaVideo"
}
}
},
Expand Down Expand Up @@ -5698,15 +5698,15 @@
"discriminator": {
"propertyName": "type",
"mapping": {
"data": "PassportElementErrorDataField",
"file": "PassportElementErrorFile",
"files": "PassportElementErrorFiles",
"front_side": "PassportElementErrorFrontSide",
"reverse_side": "PassportElementErrorReverseSide",
"selfie": "PassportElementErrorSelfie",
"translation_file": "PassportElementErrorTranslationFile",
"translation_files": "PassportElementErrorTranslationFiles",
"unspecified": "PassportElementErrorUnspecified"
"data": "#/components/schemas/PassportElementErrorDataField",
"file": "#/components/schemas/PassportElementErrorFile",
"files": "#/components/schemas/PassportElementErrorFiles",
"front_side": "#/components/schemas/PassportElementErrorFrontSide",
"reverse_side": "#/components/schemas/PassportElementErrorReverseSide",
"selfie": "#/components/schemas/PassportElementErrorSelfie",
"translation_file": "#/components/schemas/PassportElementErrorTranslationFile",
"translation_files": "#/components/schemas/PassportElementErrorTranslationFiles",
"unspecified": "#/components/schemas/PassportElementErrorUnspecified"
}
}
},
Expand Down Expand Up @@ -8956,10 +8956,10 @@
"discriminator": {
"propertyName": "type",
"mapping": {
"audio": "InputMediaAudio",
"document": "InputMediaDocument",
"photo": "InputMediaPhoto",
"video": "InputMediaVideo"
"audio": "#/components/schemas/InputMediaAudio",
"document": "#/components/schemas/InputMediaDocument",
"photo": "#/components/schemas/InputMediaPhoto",
"video": "#/components/schemas/InputMediaVideo"
}
}
}
Expand Down

0 comments on commit 172e634

Please sign in to comment.