1
Fork 0
mirror of https://github.com/thegeneralist01/twitter-openapi synced 2026-01-12 08:00:27 +01:00

feat follow up #78

Signed-off-by: ふぁ <yuki@yuki0311.com>
This commit is contained in:
ふぁ 2024-11-14 12:19:54 +09:00
parent 408fd99a69
commit 5a9695407e
No known key found for this signature in database
GPG key ID: 83A8A5E74872A8AA
2 changed files with 26 additions and 1 deletions

View file

@ -543,7 +543,7 @@ components:
delete_action_result:
$ref: "#/components/schemas/CommunityDeleteActionResult"
join_action_result:
$ref: "#/components/schemas/CommunityJoinActionResult"
$ref: "#/components/schemas/CommunityJoinActionUnion"
leave_action_result:
$ref: "#/components/schemas/CommunityLeaveActionResult"
pin_action_result:
@ -562,6 +562,16 @@ components:
type: string
enum: [Unavailable]
CommunityJoinActionUnion:
oneOf:
- $ref: "#/components/schemas/CommunityJoinActionResult"
- $ref: "#/components/schemas/CommunityJoinActionUnavailable"
discriminator:
propertyName: __typename
mapping: # deprecated
CommunityJoinAction: "#/components/schemas/CommunityJoinActionResult"
CommunityJoinActionUnavailable: "#/components/schemas/CommunityJoinActionUnavailable"
CommunityJoinActionResult:
required:
- "__typename"
@ -569,6 +579,20 @@ components:
__typename:
$ref: "./typename.yaml#/components/schemas/TypeName" # CommunityJoinAction
CommunityJoinActionUnavailable:
required:
- "__typename"
- "reason"
- "message"
properties:
__typename:
$ref: "./typename.yaml#/components/schemas/TypeName" # CommunityJoinActionUnavailable
reason:
type: string
enum: [ViewerRequestRequired]
message:
type: string
CommunityLeaveActionResult:
required:
- "__typename"