From 996bf5798eef70c97b78a11ac872a74e0a85d0be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=B5=E3=81=81?= Date: Sat, 2 Nov 2024 04:17:53 +0900 Subject: [PATCH] update existing components MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ふぁ --- dist/compatible/openapi-3.0.yaml | 34 ++++++++++++++--- .../compatible_discriminator/openapi-3.0.yaml | 34 ++++++++++++++--- dist/docs/openapi-3.0.yaml | 34 ++++++++++++++--- src/config/placeholder.json | 4 +- src/openapi/schemas/tweet.yaml | 37 ++++++++++++++++--- src/openapi/schemas/typename.yaml | 1 + 6 files changed, 123 insertions(+), 21 deletions(-) diff --git a/dist/compatible/openapi-3.0.yaml b/dist/compatible/openapi-3.0.yaml index 009e890..6f43414 100644 --- a/dist/compatible/openapi-3.0.yaml +++ b/dist/compatible/openapi-3.0.yaml @@ -319,11 +319,8 @@ components: $ref: '#/components/schemas/CommunityLeaveActionResult' pin_action_result: $ref: '#/components/schemas/CommunityPinActionResult' - required: - - delete_action_result - - join_action_result - - leave_action_result - - pin_action_result + unpin_action_result: + $ref: '#/components/schemas/CommunityUnpinActionResult' CommunityData: properties: __typename: @@ -471,6 +468,23 @@ components: $ref: '#/components/schemas/TypeName' required: - __typename + CommunityRelationship: + properties: + actions: + $ref: '#/components/schemas/CommunityActions' + id: + type: string + moderation_state: + additionalProperties: true + type: object + rest_id: + pattern: ^[0-9]+$ + type: string + required: + - id + - rest_id + - moderation_state + - actions CommunityRule: properties: description: @@ -483,6 +497,12 @@ components: required: - rest_id - name + CommunityUnpinActionResult: + properties: + __typename: + $ref: '#/components/schemas/TypeName' + required: + - __typename CommunityUrls: properties: permalink: @@ -2031,6 +2051,8 @@ components: $ref: '#/components/schemas/BirdwatchPivot' card: $ref: '#/components/schemas/TweetCard' + community_relationship: + $ref: '#/components/schemas/CommunityRelationship' community_results: $ref: '#/components/schemas/Community' core: @@ -2542,6 +2564,7 @@ components: - CommunityJoinAction - CommunityLeaveActionUnavailable - CommunityTweetPinActionUnavailable + - CommunityTweetUnpinActionUnavailable - CommunityInvitesUnavailable - CommunityJoinRequestsUnavailable - ApiImage @@ -4438,6 +4461,7 @@ paths: - media - semantic_annotation_ids - dark_request + - disallowed_reply_options type: object required: - queryId diff --git a/dist/compatible_discriminator/openapi-3.0.yaml b/dist/compatible_discriminator/openapi-3.0.yaml index cb0f8a1..445f2d3 100644 --- a/dist/compatible_discriminator/openapi-3.0.yaml +++ b/dist/compatible_discriminator/openapi-3.0.yaml @@ -319,11 +319,8 @@ components: $ref: '#/components/schemas/CommunityLeaveActionResult' pin_action_result: $ref: '#/components/schemas/CommunityPinActionResult' - required: - - delete_action_result - - join_action_result - - leave_action_result - - pin_action_result + unpin_action_result: + $ref: '#/components/schemas/CommunityUnpinActionResult' CommunityData: properties: __typename: @@ -471,6 +468,23 @@ components: $ref: '#/components/schemas/TypeName' required: - __typename + CommunityRelationship: + properties: + actions: + $ref: '#/components/schemas/CommunityActions' + id: + type: string + moderation_state: + additionalProperties: true + type: object + rest_id: + pattern: ^[0-9]+$ + type: string + required: + - id + - rest_id + - moderation_state + - actions CommunityRule: properties: description: @@ -483,6 +497,12 @@ components: required: - rest_id - name + CommunityUnpinActionResult: + properties: + __typename: + $ref: '#/components/schemas/TypeName' + required: + - __typename CommunityUrls: properties: permalink: @@ -2031,6 +2051,8 @@ components: $ref: '#/components/schemas/BirdwatchPivot' card: $ref: '#/components/schemas/TweetCard' + community_relationship: + $ref: '#/components/schemas/CommunityRelationship' community_results: $ref: '#/components/schemas/Community' core: @@ -2542,6 +2564,7 @@ components: - CommunityJoinAction - CommunityLeaveActionUnavailable - CommunityTweetPinActionUnavailable + - CommunityTweetUnpinActionUnavailable - CommunityInvitesUnavailable - CommunityJoinRequestsUnavailable - ApiImage @@ -4432,6 +4455,7 @@ paths: - media - semantic_annotation_ids - dark_request + - disallowed_reply_options type: object required: - queryId diff --git a/dist/docs/openapi-3.0.yaml b/dist/docs/openapi-3.0.yaml index a791a54..17d1270 100644 --- a/dist/docs/openapi-3.0.yaml +++ b/dist/docs/openapi-3.0.yaml @@ -319,11 +319,8 @@ components: $ref: '#/components/schemas/CommunityLeaveActionResult' pin_action_result: $ref: '#/components/schemas/CommunityPinActionResult' - required: - - delete_action_result - - join_action_result - - leave_action_result - - pin_action_result + unpin_action_result: + $ref: '#/components/schemas/CommunityUnpinActionResult' CommunityData: properties: __typename: @@ -471,6 +468,23 @@ components: $ref: '#/components/schemas/TypeName' required: - __typename + CommunityRelationship: + properties: + actions: + $ref: '#/components/schemas/CommunityActions' + id: + type: string + moderation_state: + additionalProperties: true + type: object + rest_id: + pattern: ^[0-9]+$ + type: string + required: + - id + - rest_id + - moderation_state + - actions CommunityRule: properties: description: @@ -483,6 +497,12 @@ components: required: - rest_id - name + CommunityUnpinActionResult: + properties: + __typename: + $ref: '#/components/schemas/TypeName' + required: + - __typename CommunityUrls: properties: permalink: @@ -2031,6 +2051,8 @@ components: $ref: '#/components/schemas/BirdwatchPivot' card: $ref: '#/components/schemas/TweetCard' + community_relationship: + $ref: '#/components/schemas/CommunityRelationship' community_results: $ref: '#/components/schemas/Community' core: @@ -2542,6 +2564,7 @@ components: - CommunityJoinAction - CommunityLeaveActionUnavailable - CommunityTweetPinActionUnavailable + - CommunityTweetUnpinActionUnavailable - CommunityInvitesUnavailable - CommunityJoinRequestsUnavailable - ApiImage @@ -4544,6 +4567,7 @@ paths: - media - semantic_annotation_ids - dark_request + - disallowed_reply_options type: object required: - queryId diff --git a/src/config/placeholder.json b/src/config/placeholder.json index 31ac8a6..a12f383 100644 --- a/src/config/placeholder.json +++ b/src/config/placeholder.json @@ -710,7 +710,8 @@ "variables": { "tweet_text": "test", "media": { - "media_entities": [ + "media_entities": [], + "media_entities?": [ { "media_id": "1111111111111111111", "tagged_users": ["44196397"] @@ -724,6 +725,7 @@ "exclude_reply_user_ids": [] }, "dark_request": false, + "disallowed_reply_options": null, "disallowed_reply_options?": {}, "conversation_control?": { "mode": "Community" diff --git a/src/openapi/schemas/tweet.yaml b/src/openapi/schemas/tweet.yaml index d31b161..7fee812 100644 --- a/src/openapi/schemas/tweet.yaml +++ b/src/openapi/schemas/tweet.yaml @@ -193,6 +193,8 @@ components: $ref: "#/components/schemas/SuperFollowsReplyUserResult" has_birdwatch_notes: type: boolean + community_relationship: + $ref: "#/components/schemas/CommunityRelationship" author_community_relationship: $ref: "#/components/schemas/AuthorCommunityRelationship" article: @@ -397,6 +399,25 @@ components: screen_name: type: string + # {'id': 'VHdlZXRDb21tdW5pdHlSZWxhdGlvbnNoaXA6MTg1MjA1NTM2NDA3MTgyNTY0NQ==', 'rest_id': '1852055364071825645', 'moderation_state': {}, 'actions': {'pin_action_result': {'__typename': 'CommunityTweetPinActionUnavailable'} + CommunityRelationship: + required: + - "id" + - "rest_id" + - "moderation_state" + - "actions" + properties: + id: + type: string + rest_id: + type: string + pattern: "^[0-9]+$" + moderation_state: + type: object + additionalProperties: true # todo + actions: + $ref: "#/components/schemas/CommunityActions" + AuthorCommunityRelationship: required: - "community_results" @@ -516,11 +537,8 @@ components: type: string CommunityActions: - required: - - "delete_action_result" - - "join_action_result" - - "leave_action_result" - - "pin_action_result" + # required: + # - "pin_action_result" properties: delete_action_result: $ref: "#/components/schemas/CommunityDeleteActionResult" @@ -530,6 +548,8 @@ components: $ref: "#/components/schemas/CommunityLeaveActionResult" pin_action_result: $ref: "#/components/schemas/CommunityPinActionResult" + unpin_action_result: + $ref: "#/components/schemas/CommunityUnpinActionResult" CommunityDeleteActionResult: required: @@ -570,6 +590,13 @@ components: __typename: $ref: "./typename.yaml#/components/schemas/TypeName" # CommunityTweetPinActionUnavailable + CommunityUnpinActionResult: + required: + - "__typename" + properties: + __typename: + $ref: "./typename.yaml#/components/schemas/TypeName" # CommunityTweetUnpinActionUnavailable + CommunityInvitesResult: required: - "__typename" diff --git a/src/openapi/schemas/typename.yaml b/src/openapi/schemas/typename.yaml index 1b32c18..1b34fc3 100644 --- a/src/openapi/schemas/typename.yaml +++ b/src/openapi/schemas/typename.yaml @@ -29,6 +29,7 @@ components: CommunityJoinAction, CommunityLeaveActionUnavailable, CommunityTweetPinActionUnavailable, + CommunityTweetUnpinActionUnavailable, CommunityInvitesUnavailable, CommunityJoinRequestsUnavailable, ApiImage,