Skip to content

Commit

Permalink
Merge pull request #76 from fa0311/dev
Browse files Browse the repository at this point in the history
update existing components
  • Loading branch information
fa0311 authored Nov 1, 2024
2 parents 172a7ee + 996bf57 commit bc50143
Show file tree
Hide file tree
Showing 6 changed files with 123 additions and 21 deletions.
34 changes: 29 additions & 5 deletions dist/compatible/openapi-3.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -483,6 +497,12 @@ components:
required:
- rest_id
- name
CommunityUnpinActionResult:
properties:
__typename:
$ref: '#/components/schemas/TypeName'
required:
- __typename
CommunityUrls:
properties:
permalink:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -2542,6 +2564,7 @@ components:
- CommunityJoinAction
- CommunityLeaveActionUnavailable
- CommunityTweetPinActionUnavailable
- CommunityTweetUnpinActionUnavailable
- CommunityInvitesUnavailable
- CommunityJoinRequestsUnavailable
- ApiImage
Expand Down Expand Up @@ -4438,6 +4461,7 @@ paths:
- media
- semantic_annotation_ids
- dark_request
- disallowed_reply_options
type: object
required:
- queryId
Expand Down
34 changes: 29 additions & 5 deletions dist/compatible_discriminator/openapi-3.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -483,6 +497,12 @@ components:
required:
- rest_id
- name
CommunityUnpinActionResult:
properties:
__typename:
$ref: '#/components/schemas/TypeName'
required:
- __typename
CommunityUrls:
properties:
permalink:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -2542,6 +2564,7 @@ components:
- CommunityJoinAction
- CommunityLeaveActionUnavailable
- CommunityTweetPinActionUnavailable
- CommunityTweetUnpinActionUnavailable
- CommunityInvitesUnavailable
- CommunityJoinRequestsUnavailable
- ApiImage
Expand Down Expand Up @@ -4432,6 +4455,7 @@ paths:
- media
- semantic_annotation_ids
- dark_request
- disallowed_reply_options
type: object
required:
- queryId
Expand Down
34 changes: 29 additions & 5 deletions dist/docs/openapi-3.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -483,6 +497,12 @@ components:
required:
- rest_id
- name
CommunityUnpinActionResult:
properties:
__typename:
$ref: '#/components/schemas/TypeName'
required:
- __typename
CommunityUrls:
properties:
permalink:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -2542,6 +2564,7 @@ components:
- CommunityJoinAction
- CommunityLeaveActionUnavailable
- CommunityTweetPinActionUnavailable
- CommunityTweetUnpinActionUnavailable
- CommunityInvitesUnavailable
- CommunityJoinRequestsUnavailable
- ApiImage
Expand Down Expand Up @@ -4544,6 +4567,7 @@ paths:
- media
- semantic_annotation_ids
- dark_request
- disallowed_reply_options
type: object
required:
- queryId
Expand Down
4 changes: 3 additions & 1 deletion src/config/placeholder.json
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,8 @@
"variables": {
"tweet_text": "test",
"media": {
"media_entities": [
"media_entities": [],
"media_entities?": [
{
"media_id": "1111111111111111111",
"tagged_users": ["44196397"]
Expand All @@ -724,6 +725,7 @@
"exclude_reply_user_ids": []
},
"dark_request": false,
"disallowed_reply_options": null,
"disallowed_reply_options?": {},
"conversation_control?": {
"mode": "Community"
Expand Down
37 changes: 32 additions & 5 deletions src/openapi/schemas/tweet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand All @@ -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:
Expand Down Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions src/openapi/schemas/typename.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ components:
CommunityJoinAction,
CommunityLeaveActionUnavailable,
CommunityTweetPinActionUnavailable,
CommunityTweetUnpinActionUnavailable,
CommunityInvitesUnavailable,
CommunityJoinRequestsUnavailable,
ApiImage,
Expand Down

0 comments on commit bc50143

Please sign in to comment.