From 3bb5ae8e102936ddaf9fb8735f8f2a653e2a20be Mon Sep 17 00:00:00 2001 From: rxliuli Date: Thu, 7 Aug 2025 12:34:02 +0800 Subject: [PATCH 1/2] fix: close https://github.com/fa0311/twitter-openapi/issues/95 --- src/openapi/schemas/user.yaml | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/src/openapi/schemas/user.yaml b/src/openapi/schemas/user.yaml index ef6439e..4839b32 100644 --- a/src/openapi/schemas/user.yaml +++ b/src/openapi/schemas/user.yaml @@ -242,9 +242,21 @@ components: type: string enum: ["Self", "Public", "MutualFollow", "Followers", "Following"] - UserLegacy: + UserLegacyCore: required: - "created_at" + - "name" + - "screen_name" + properties: + created_at: + $ref: "./general.yaml#/components/schemas/TwitterTimeFormat" + name: + type: string + screen_name: + type: string + UserLegacy: + required: + - "core" - "default_profile" - "default_profile_image" - "description" @@ -258,13 +270,11 @@ components: - "listed_count" - "location" - "media_count" - - "name" - "normal_followers_count" - "pinned_tweet_ids_str" - "possibly_sensitive" - "profile_image_url_https" - "profile_interstitial_type" - - "screen_name" - "status" - "statuses_count" - "translator_type" @@ -278,8 +288,6 @@ components: type: boolean can_media_tag: type: boolean - created_at: - $ref: "./general.yaml#/components/schemas/TwitterTimeFormat" default_profile: type: boolean default_profile_image: @@ -314,9 +322,6 @@ components: media_count: type: integer muting: - type: boolean - name: - type: string normal_followers_count: type: integer notifications: @@ -341,8 +346,8 @@ components: type: string protected: type: boolean - screen_name: - type: string + core: + $ref: "#/components/schemas/UserLegacyCore" statuses_count: type: integer translator_type: From 817a5de42aee48d09e80c55b59794b9a4a09d332 Mon Sep 17 00:00:00 2001 From: rxliuli Date: Thu, 7 Aug 2025 13:30:16 +0800 Subject: [PATCH 2/2] chore: fix yaml error --- src/openapi/schemas/user.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/openapi/schemas/user.yaml b/src/openapi/schemas/user.yaml index 4839b32..c110d78 100644 --- a/src/openapi/schemas/user.yaml +++ b/src/openapi/schemas/user.yaml @@ -322,6 +322,7 @@ components: media_count: type: integer muting: + type: boolean normal_followers_count: type: integer notifications: