twitter-openapi-typescript-generated 0.0.5 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (199) hide show
  1. package/.openapi-generator/FILES +7 -1
  2. package/README.md +2 -2
  3. package/dist/apis/DefaultApi.d.ts +1 -1
  4. package/dist/apis/DefaultApi.d.ts.map +1 -1
  5. package/dist/apis/DefaultApi.js +3 -6
  6. package/dist/apis/DefaultApi.js.map +1 -1
  7. package/dist/apis/PostApi.d.ts +6 -0
  8. package/dist/apis/PostApi.d.ts.map +1 -1
  9. package/dist/apis/PostApi.js +24 -6
  10. package/dist/apis/PostApi.js.map +1 -1
  11. package/dist/apis/TweetApi.d.ts +9 -9
  12. package/dist/apis/TweetApi.d.ts.map +1 -1
  13. package/dist/apis/TweetApi.js +27 -54
  14. package/dist/apis/TweetApi.js.map +1 -1
  15. package/dist/apis/UserApi.d.ts +1 -1
  16. package/dist/apis/UserApi.d.ts.map +1 -1
  17. package/dist/apis/UserApi.js +3 -6
  18. package/dist/apis/UserApi.js.map +1 -1
  19. package/dist/apis/UserListApi.d.ts +2 -2
  20. package/dist/apis/UserListApi.d.ts.map +1 -1
  21. package/dist/apis/UserListApi.js +6 -12
  22. package/dist/apis/UserListApi.js.map +1 -1
  23. package/dist/models/Entities.d.ts +3 -2
  24. package/dist/models/Entities.d.ts.map +1 -1
  25. package/dist/models/Entities.js +3 -2
  26. package/dist/models/Entities.js.map +1 -1
  27. package/dist/models/PostCreateRetweetRequest.d.ts +3 -3
  28. package/dist/models/PostCreateRetweetRequest.d.ts.map +1 -1
  29. package/dist/models/PostCreateRetweetRequest.js +3 -3
  30. package/dist/models/PostCreateRetweetRequest.js.map +1 -1
  31. package/dist/models/PostCreateRetweetRequestVariables.d.ts +38 -0
  32. package/dist/models/PostCreateRetweetRequestVariables.d.ts.map +1 -0
  33. package/dist/models/PostCreateRetweetRequestVariables.js +54 -0
  34. package/dist/models/PostCreateRetweetRequestVariables.js.map +1 -0
  35. package/dist/models/PostDeleteTweetRequest.d.ts +3 -3
  36. package/dist/models/PostDeleteTweetRequest.d.ts.map +1 -1
  37. package/dist/models/PostDeleteTweetRequest.js +3 -3
  38. package/dist/models/PostDeleteTweetRequest.js.map +1 -1
  39. package/dist/models/PostFavoriteTweetRequest.d.ts +3 -3
  40. package/dist/models/PostFavoriteTweetRequest.d.ts.map +1 -1
  41. package/dist/models/PostFavoriteTweetRequest.js +3 -3
  42. package/dist/models/PostFavoriteTweetRequest.js.map +1 -1
  43. package/dist/models/PostUnfavoriteTweetRequest.d.ts +3 -3
  44. package/dist/models/PostUnfavoriteTweetRequest.d.ts.map +1 -1
  45. package/dist/models/PostUnfavoriteTweetRequest.js +3 -3
  46. package/dist/models/PostUnfavoriteTweetRequest.js.map +1 -1
  47. package/dist/models/Tweet.d.ts +7 -0
  48. package/dist/models/Tweet.d.ts.map +1 -1
  49. package/dist/models/Tweet.js +3 -0
  50. package/dist/models/Tweet.js.map +1 -1
  51. package/dist/models/TweetCard.d.ts +39 -0
  52. package/dist/models/TweetCard.d.ts.map +1 -0
  53. package/dist/models/TweetCard.js +54 -0
  54. package/dist/models/TweetCard.js.map +1 -0
  55. package/dist/models/TweetCardLegacy.d.ts +45 -0
  56. package/dist/models/TweetCardLegacy.d.ts.map +1 -0
  57. package/dist/models/TweetCardLegacy.js +58 -0
  58. package/dist/models/TweetCardLegacy.js.map +1 -0
  59. package/dist/models/TweetCardLegacyBindingValuesInner.d.ts +39 -0
  60. package/dist/models/TweetCardLegacyBindingValuesInner.d.ts.map +1 -0
  61. package/dist/models/TweetCardLegacyBindingValuesInner.js +55 -0
  62. package/dist/models/TweetCardLegacyBindingValuesInner.js.map +1 -0
  63. package/dist/models/TweetCardLegacyBindingValuesInnerValue.d.ts +50 -0
  64. package/dist/models/TweetCardLegacyBindingValuesInnerValue.d.ts.map +1 -0
  65. package/dist/models/TweetCardLegacyBindingValuesInnerValue.js +58 -0
  66. package/dist/models/TweetCardLegacyBindingValuesInnerValue.js.map +1 -0
  67. package/dist/models/TweetLegacy.d.ts +7 -0
  68. package/dist/models/TweetLegacy.d.ts.map +1 -1
  69. package/dist/models/TweetLegacy.js +3 -0
  70. package/dist/models/TweetLegacy.js.map +1 -1
  71. package/dist/models/TweetLegacySelfThread.d.ts +32 -0
  72. package/dist/models/TweetLegacySelfThread.d.ts.map +1 -0
  73. package/dist/models/TweetLegacySelfThread.js +51 -0
  74. package/dist/models/TweetLegacySelfThread.js.map +1 -0
  75. package/dist/models/Url.d.ts +50 -0
  76. package/dist/models/Url.d.ts.map +1 -0
  77. package/dist/models/Url.js +60 -0
  78. package/dist/models/Url.js.map +1 -0
  79. package/dist/models/index.d.ts +7 -1
  80. package/dist/models/index.d.ts.map +1 -1
  81. package/dist/models/index.js +7 -1
  82. package/dist/models/index.js.map +1 -1
  83. package/package.json +1 -1
  84. package/src/apis/DefaultApi.ts +4 -8
  85. package/src/apis/PostApi.ts +36 -6
  86. package/src/apis/TweetApi.ts +36 -72
  87. package/src/apis/UserApi.ts +4 -8
  88. package/src/apis/UserListApi.ts +8 -16
  89. package/src/models/Entities.ts +10 -4
  90. package/src/models/PostCreateRetweetRequest.ts +9 -9
  91. package/src/models/{PostDeleteTweetRequestVariables.ts → PostCreateRetweetRequestVariables.ts} +10 -10
  92. package/src/models/PostDeleteTweetRequest.ts +9 -9
  93. package/src/models/PostFavoriteTweetRequest.ts +9 -9
  94. package/src/models/PostUnfavoriteTweetRequest.ts +9 -9
  95. package/src/models/Tweet.ts +14 -0
  96. package/src/models/TweetCard.ts +80 -0
  97. package/src/models/TweetCardLegacy.ts +91 -0
  98. package/src/models/TweetCardLegacyBindingValuesInner.ts +82 -0
  99. package/src/models/TweetCardLegacyBindingValuesInnerValue.ts +90 -0
  100. package/src/models/TweetLegacy.ts +14 -0
  101. package/src/models/TweetLegacySelfThread.ts +66 -0
  102. package/src/models/Url.ts +93 -0
  103. package/src/models/index.ts +7 -1
  104. package/tools/openapi-generator-config.yaml +2 -2
  105. package/tools/win/replace.py +20 -20
  106. package/twitter-openapi/README.md +4 -6
  107. package/twitter-openapi/dist/{test → compatible}/openapi-3.0.yaml +38 -38
  108. package/twitter-openapi/dist/{typescript → compatible}/paths/bookmarks.yaml +5 -5
  109. package/twitter-openapi/dist/{test → compatible}/paths/follow.yaml +14 -14
  110. package/twitter-openapi/dist/{typescript → compatible}/paths/post.yaml +135 -93
  111. package/twitter-openapi/dist/{test → compatible}/paths/profile.yaml +5 -5
  112. package/twitter-openapi/dist/{typescript → compatible}/paths/timeline.yaml +25 -25
  113. package/twitter-openapi/dist/{test → compatible}/paths/tweet.yaml +5 -5
  114. package/twitter-openapi/dist/{test → compatible}/paths/user.yaml +5 -5
  115. package/twitter-openapi/dist/{test → compatible}/paths/usertweets.yaml +36 -36
  116. package/twitter-openapi/dist/compatible/resources/parameters.yaml +13 -0
  117. package/twitter-openapi/dist/{dart → compatible}/schemas/tweet.yaml +65 -0
  118. package/twitter-openapi/dist/docs/openapi-3.0.yaml +38 -38
  119. package/twitter-openapi/dist/docs/paths/bookmarks.yaml +7 -56
  120. package/twitter-openapi/dist/docs/paths/follow.yaml +18 -116
  121. package/twitter-openapi/dist/docs/paths/post.yaml +124 -82
  122. package/twitter-openapi/dist/docs/paths/profile.yaml +7 -35
  123. package/twitter-openapi/dist/docs/paths/timeline.yaml +43 -192
  124. package/twitter-openapi/dist/docs/paths/tweet.yaml +7 -61
  125. package/twitter-openapi/dist/docs/paths/user.yaml +7 -41
  126. package/twitter-openapi/dist/docs/paths/usertweets.yaml +53 -263
  127. package/twitter-openapi/dist/docs/resources/parameters.yaml +13 -0
  128. package/twitter-openapi/dist/docs/schemas/tweet.yaml +65 -0
  129. package/twitter-openapi/src/openapi/paths/bookmarks.yaml +1 -1
  130. package/twitter-openapi/src/openapi/paths/follow.yaml +2 -2
  131. package/twitter-openapi/src/openapi/paths/post.yaml +6 -6
  132. package/twitter-openapi/src/openapi/paths/profile.yaml +1 -1
  133. package/twitter-openapi/src/openapi/paths/timeline.yaml +3 -3
  134. package/twitter-openapi/src/openapi/paths/tweet.yaml +1 -1
  135. package/twitter-openapi/src/openapi/paths/user.yaml +1 -1
  136. package/twitter-openapi/src/openapi/paths/usertweets.yaml +4 -4
  137. package/twitter-openapi/src/openapi/resources/parameters.yaml +15 -0
  138. package/twitter-openapi/src/openapi/schemas/tweet.yaml +66 -1
  139. package/twitter-openapi/tools/__pycache__/build_config.cpython-310.pyc +0 -0
  140. package/twitter-openapi/tools/__pycache__/hooks.cpython-310.pyc +0 -0
  141. package/twitter-openapi/tools/build_config.py +67 -190
  142. package/twitter-openapi/tools/hooks.py +58 -13
  143. package/dist/models/PostDeleteTweetRequestVariables.d.ts +0 -38
  144. package/dist/models/PostDeleteTweetRequestVariables.d.ts.map +0 -1
  145. package/dist/models/PostDeleteTweetRequestVariables.js +0 -54
  146. package/dist/models/PostDeleteTweetRequestVariables.js.map +0 -1
  147. package/twitter-openapi/dist/dart/openapi-3.0.yaml +0 -117
  148. package/twitter-openapi/dist/dart/paths/bookmarks.yaml +0 -134
  149. package/twitter-openapi/dist/dart/paths/follow.yaml +0 -262
  150. package/twitter-openapi/dist/dart/paths/post.yaml +0 -834
  151. package/twitter-openapi/dist/dart/paths/profile.yaml +0 -152
  152. package/twitter-openapi/dist/dart/paths/timeline.yaml +0 -380
  153. package/twitter-openapi/dist/dart/paths/tweet.yaml +0 -134
  154. package/twitter-openapi/dist/dart/paths/user.yaml +0 -112
  155. package/twitter-openapi/dist/dart/paths/usertweets.yaml +0 -484
  156. package/twitter-openapi/dist/dart/paths/v1.1-get.yaml +0 -300
  157. package/twitter-openapi/dist/dart/paths/v1.1-post.yaml +0 -295
  158. package/twitter-openapi/dist/dart/paths/v2.0-get.yaml +0 -331
  159. package/twitter-openapi/dist/test/paths/bookmarks.yaml +0 -105
  160. package/twitter-openapi/dist/test/paths/other.yaml +0 -96
  161. package/twitter-openapi/dist/test/paths/post.yaml +0 -485
  162. package/twitter-openapi/dist/test/paths/timeline.yaml +0 -293
  163. package/twitter-openapi/dist/test/paths/v1.1-get.yaml +0 -242
  164. package/twitter-openapi/dist/test/paths/v1.1-post.yaml +0 -277
  165. package/twitter-openapi/dist/test/paths/v2.0-get.yaml +0 -302
  166. package/twitter-openapi/dist/test/response/error.yaml +0 -90
  167. package/twitter-openapi/dist/test/schemas/content.yaml +0 -181
  168. package/twitter-openapi/dist/test/schemas/general.yaml +0 -13
  169. package/twitter-openapi/dist/test/schemas/instruction.yaml +0 -83
  170. package/twitter-openapi/dist/test/schemas/timeline.yaml +0 -25
  171. package/twitter-openapi/dist/test/schemas/tweet.yaml +0 -251
  172. package/twitter-openapi/dist/test/schemas/typename.yaml +0 -19
  173. package/twitter-openapi/dist/test/schemas/user.yaml +0 -206
  174. package/twitter-openapi/dist/typescript/openapi-3.0.yaml +0 -141
  175. package/twitter-openapi/dist/typescript/paths/follow.yaml +0 -204
  176. package/twitter-openapi/dist/typescript/paths/other.yaml +0 -96
  177. package/twitter-openapi/dist/typescript/paths/profile.yaml +0 -123
  178. package/twitter-openapi/dist/typescript/paths/tweet.yaml +0 -105
  179. package/twitter-openapi/dist/typescript/paths/user.yaml +0 -83
  180. package/twitter-openapi/dist/typescript/paths/usertweets.yaml +0 -368
  181. package/twitter-openapi/dist/typescript/response/error.yaml +0 -90
  182. package/twitter-openapi/dist/typescript/schemas/content.yaml +0 -181
  183. package/twitter-openapi/dist/typescript/schemas/general.yaml +0 -13
  184. package/twitter-openapi/dist/typescript/schemas/instruction.yaml +0 -83
  185. package/twitter-openapi/dist/typescript/schemas/timeline.yaml +0 -25
  186. package/twitter-openapi/dist/typescript/schemas/tweet.yaml +0 -251
  187. package/twitter-openapi/dist/typescript/schemas/typename.yaml +0 -19
  188. package/twitter-openapi/dist/typescript/schemas/user.yaml +0 -206
  189. /package/twitter-openapi/dist/{dart → compatible}/paths/other.yaml +0 -0
  190. /package/twitter-openapi/dist/{typescript → compatible}/paths/v1.1-get.yaml +0 -0
  191. /package/twitter-openapi/dist/{typescript → compatible}/paths/v1.1-post.yaml +0 -0
  192. /package/twitter-openapi/dist/{typescript → compatible}/paths/v2.0-get.yaml +0 -0
  193. /package/twitter-openapi/dist/{dart → compatible}/response/error.yaml +0 -0
  194. /package/twitter-openapi/dist/{dart → compatible}/schemas/content.yaml +0 -0
  195. /package/twitter-openapi/dist/{dart → compatible}/schemas/general.yaml +0 -0
  196. /package/twitter-openapi/dist/{dart → compatible}/schemas/instruction.yaml +0 -0
  197. /package/twitter-openapi/dist/{dart → compatible}/schemas/timeline.yaml +0 -0
  198. /package/twitter-openapi/dist/{dart → compatible}/schemas/typename.yaml +0 -0
  199. /package/twitter-openapi/dist/{dart → compatible}/schemas/user.yaml +0 -0
@@ -4,7 +4,7 @@ info:
4
4
  version: 0.0.1
5
5
 
6
6
  paths:
7
- /graphql/{{queryId}}/Following:
7
+ /graphql/{pathQueryId}/Following:
8
8
  get:
9
9
  operationId: getFollowing
10
10
  description: get user list of following
@@ -18,7 +18,7 @@ paths:
18
18
  tags:
19
19
  - "user-list"
20
20
 
21
- /graphql/{{queryId}}/Followers:
21
+ /graphql/{pathQueryId}/Followers:
22
22
  get:
23
23
  operationId: getFollowers
24
24
  description: get user list of followers
@@ -4,7 +4,7 @@ info:
4
4
  version: 0.0.1
5
5
 
6
6
  paths:
7
- /graphql/{{queryId}}/FavoriteTweet:
7
+ /graphql/{pathQueryId}/FavoriteTweet:
8
8
  post:
9
9
  operationId: postFavoriteTweet
10
10
  description: favorite Tweet
@@ -18,7 +18,7 @@ paths:
18
18
  tags:
19
19
  - "post"
20
20
 
21
- /graphql/{{queryId}}/UnfavoriteTweet:
21
+ /graphql/{pathQueryId}/UnfavoriteTweet:
22
22
  post:
23
23
  operationId: postUnfavoriteTweet
24
24
  description: unfavorite Tweet
@@ -32,7 +32,7 @@ paths:
32
32
  tags:
33
33
  - "post"
34
34
 
35
- /graphql/{{queryId}}/CreateRetweet:
35
+ /graphql/{pathQueryId}/CreateRetweet:
36
36
  post:
37
37
  operationId: postCreateRetweet
38
38
  description: create Retweet
@@ -46,7 +46,7 @@ paths:
46
46
  tags:
47
47
  - "post"
48
48
 
49
- /graphql/{{queryId}}/DeleteRetweet:
49
+ /graphql/{pathQueryId}/DeleteRetweet:
50
50
  post:
51
51
  operationId: postDeleteRetweet
52
52
  description: delete Retweet
@@ -60,7 +60,7 @@ paths:
60
60
  tags:
61
61
  - "post"
62
62
 
63
- /graphql/{{queryId}}/CreateTweet:
63
+ /graphql/{pathQueryId}/CreateTweet:
64
64
  post:
65
65
  operationId: postCreateTweet
66
66
  description: create Tweet
@@ -74,7 +74,7 @@ paths:
74
74
  tags:
75
75
  - "post"
76
76
 
77
- /graphql/{{queryId}}/DeleteTweet:
77
+ /graphql/{pathQueryId}/DeleteTweet:
78
78
  post:
79
79
  operationId: postDeleteTweet
80
80
  description: delete Retweet
@@ -4,7 +4,7 @@ info:
4
4
  version: 0.0.1
5
5
 
6
6
  paths:
7
- /graphql/{{queryId}}/ProfileSpotlightsQuery:
7
+ /graphql/{pathQueryId}/ProfileSpotlightsQuery:
8
8
  get:
9
9
  operationId: getProfileSpotlightsQuery
10
10
  description: "get user by screen name"
@@ -4,7 +4,7 @@ info:
4
4
  version: 0.0.1
5
5
 
6
6
  paths:
7
- /graphql/{{queryId}}/HomeTimeline:
7
+ /graphql/{pathQueryId}/HomeTimeline:
8
8
  get:
9
9
  operationId: getHomeTimeline
10
10
  description: get tweet list of timeline
@@ -18,7 +18,7 @@ paths:
18
18
  tags:
19
19
  - "tweet"
20
20
 
21
- /graphql/{{queryId}}/HomeLatestTimeline:
21
+ /graphql/{pathQueryId}/HomeLatestTimeline:
22
22
  get:
23
23
  operationId: getHomeLatestTimeline
24
24
  description: get tweet list of timeline
@@ -32,7 +32,7 @@ paths:
32
32
  tags:
33
33
  - "tweet"
34
34
 
35
- /graphql/{{queryId}}/ListLatestTweetsTimeline:
35
+ /graphql/{pathQueryId}/ListLatestTweetsTimeline:
36
36
  get:
37
37
  operationId: getListLatestTweetsTimeline
38
38
  description: get tweet list of timeline
@@ -4,7 +4,7 @@ info:
4
4
  version: 0.0.1
5
5
 
6
6
  paths:
7
- /graphql/{{queryId}}/TweetDetail:
7
+ /graphql/{pathQueryId}/TweetDetail:
8
8
  get:
9
9
  operationId: getTweetDetail
10
10
  description: get TweetDetail
@@ -4,7 +4,7 @@ info:
4
4
  version: 0.0.1
5
5
 
6
6
  paths:
7
- /graphql/{{queryId}}/UserByScreenName:
7
+ /graphql/{pathQueryId}/UserByScreenName:
8
8
  get:
9
9
  operationId: getUserByScreenName
10
10
  description: "get user by screen name"
@@ -4,7 +4,7 @@ info:
4
4
  version: 0.0.1
5
5
 
6
6
  paths:
7
- /graphql/{{queryId}}/UserTweets:
7
+ /graphql/{pathQueryId}/UserTweets:
8
8
  get:
9
9
  operationId: getUserTweets
10
10
  description: "get user tweets"
@@ -18,7 +18,7 @@ paths:
18
18
  tags:
19
19
  - "tweet"
20
20
 
21
- /graphql/{{queryId}}/UserTweetsAndReplies:
21
+ /graphql/{pathQueryId}/UserTweetsAndReplies:
22
22
  get:
23
23
  operationId: getUserTweetsAndReplies
24
24
  description: "get user replies tweets"
@@ -32,7 +32,7 @@ paths:
32
32
  tags:
33
33
  - "tweet"
34
34
 
35
- /graphql/{{queryId}}/UserMedia:
35
+ /graphql/{pathQueryId}/UserMedia:
36
36
  get:
37
37
  operationId: getUserMedia
38
38
  description: "get user media tweets"
@@ -46,7 +46,7 @@ paths:
46
46
  tags:
47
47
  - "tweet"
48
48
 
49
- /graphql/{{queryId}}/Likes:
49
+ /graphql/{pathQueryId}/Likes:
50
50
  get:
51
51
  operationId: getLikes
52
52
  description: "get user likes tweets"
@@ -0,0 +1,15 @@
1
+ openapi: 3.0.3
2
+ info:
3
+ title: Twitter OpenAPI
4
+ version: 0.0.1
5
+
6
+ paths: {}
7
+
8
+ components:
9
+ parameters:
10
+ queryId:
11
+ name: queryId
12
+ in: path
13
+ required: true
14
+ schema:
15
+ type: string
@@ -53,6 +53,45 @@ components:
53
53
  pattern: "^[0-9]+$"
54
54
  core:
55
55
  $ref: "./user.yaml#/components/schemas/UserResultCore"
56
+ card:
57
+ type: object
58
+ properties:
59
+ rest_id:
60
+ type: string
61
+ legacy:
62
+ type: object
63
+ required:
64
+ - "binding_values"
65
+ - "name"
66
+ - "url"
67
+ properties:
68
+ name:
69
+ type: string
70
+ url:
71
+ type: string
72
+ binding_values:
73
+ type: array
74
+ items:
75
+ type: object
76
+ required:
77
+ - "key"
78
+ - "value"
79
+ properties:
80
+ key:
81
+ type: string
82
+ value:
83
+ type: object
84
+ required:
85
+ - "type"
86
+ properties:
87
+ string_value:
88
+ type: string
89
+ boolean_value:
90
+ type: boolean
91
+ scribe_key:
92
+ type: string
93
+ type:
94
+ type: string
56
95
  unmention_data:
57
96
  type: object # todo
58
97
  edit_control:
@@ -161,6 +200,14 @@ components:
161
200
  id_str:
162
201
  type: string
163
202
  pattern: "^[0-9]+$"
203
+ self_thread:
204
+ type: object
205
+ required:
206
+ - "id_str"
207
+ properties:
208
+ id_str:
209
+ type: string
210
+ pattern: "^[0-9]+$"
164
211
  extended_entities:
165
212
  $ref: "#/components/schemas/ExtendedEntities"
166
213
 
@@ -200,7 +247,25 @@ components:
200
247
  UserMention:
201
248
  type: object # todo
202
249
  Url:
203
- type: object # todo
250
+ type: object
251
+ required:
252
+ - "url"
253
+ - "indices"
254
+ - "expanded_url"
255
+ - "display_url"
256
+ properties:
257
+ display_url:
258
+ type: string
259
+ expanded_url:
260
+ type: string
261
+ format: uri
262
+ url:
263
+ type: string
264
+ format: uri
265
+ indices:
266
+ type: array
267
+ items:
268
+ type: integer
204
269
 
205
270
  ExtendedEntities:
206
271
  required:
@@ -5,196 +5,73 @@ class Config:
5
5
  OUTPUT_DIR = "dist/{0}"
6
6
  INPUT_DIR = "src/openapi"
7
7
 
8
+ def hooks_generator(self, queryParameterJson=True):
9
+ # https://stackoverflow.com/questions/34820064/defining-an-api-with-swagger-get-call-that-uses-json-in-parameters/45223964
10
+ if queryParameterJson:
11
+ getParamHook = AddParametersOnContent(
12
+ split=-1,
13
+ contentType="application/json",
14
+ ignoreKeys=["queryId"],
15
+ )
16
+ postParamHook = AddParametersOnParameters(
17
+ split=-1,
18
+ schemaType=None,
19
+ )
20
+ else:
21
+ getParamHook = AddParametersOnParameters(
22
+ split=-1,
23
+ schemaType="string",
24
+ ignoreKeys=["queryId"],
25
+ )
26
+ postParamHook = AddParametersOnBody(
27
+ split=-1,
28
+ schemaType=None,
29
+ contentType="application/json",
30
+ )
31
+
32
+ return {
33
+ "openapi": [AddSecuritySchemesOnSecuritySchemes()],
34
+ "schemas": [],
35
+ "other": [],
36
+ "request": {
37
+ key: [
38
+ SetResponsesHeader(suffix=None),
39
+ AddPathQueryIdOnParameters(split=-1),
40
+ getParamHook,
41
+ ]
42
+ for key in ["default", "user", "user-list", "tweet"]
43
+ }
44
+ | {
45
+ key: [
46
+ SetResponsesHeader(suffix=None),
47
+ AddPathQueryIdOnParameters(split=-1),
48
+ postParamHook,
49
+ ]
50
+ for key in ["post"]
51
+ }
52
+ | {
53
+ key: [
54
+ SetResponsesHeader(suffix="legacy"),
55
+ AddParametersOnParameters(split=2, schemaType=None),
56
+ ]
57
+ for key in ["v1.1-get", "v2.0-get"]
58
+ }
59
+ | {
60
+ key: [
61
+ SetResponsesHeader(suffix="legacy"),
62
+ AddParametersOnBody(
63
+ split=2,
64
+ schemaType=None,
65
+ contentType="application/x-www-form-urlencoded",
66
+ ),
67
+ ]
68
+ for key in ["v1.1-post", "v2.0-post"]
69
+ }
70
+ | {"other": []},
71
+ }
72
+
8
73
  def main(self):
9
74
  return {
10
- "docs": {
11
- "openapi": [AddSecuritySchemesOnSecuritySchemes()],
12
- "schemas": [],
13
- "other":[],
14
- "request": {
15
- key: [
16
- ReplaceQueryIdPlaceholder(split=-1),
17
- SetResponsesHeader(suffix=None),
18
- AddParametersOnContent(
19
- split=-1, contentType="application/json"
20
- ),
21
- ]
22
- for key in ["default", "user", "user-list", "tweet"]
23
- }
24
- | {
25
- key: [
26
- ReplaceQueryIdPlaceholder(split=-1),
27
- SetResponsesHeader(suffix=None),
28
- AddParametersOnParameters(
29
- split=-1,
30
- schemaType=None,
31
- ),
32
- ]
33
- for key in ["post"]
34
- }
35
- | {
36
- key: [
37
- SetResponsesHeader(suffix="legacy"),
38
- AddParametersOnParameters(
39
- split=2,
40
- schemaType=None,
41
- ),
42
- ]
43
- for key in ["v1.1-get", "v2.0-get"]
44
- }
45
- | {
46
- key: [
47
- SetResponsesHeader(suffix="legacy"),
48
- AddParametersOnBody(
49
- split=2,
50
- schemaType=None,
51
- contentType="application/x-www-form-urlencoded",
52
- ),
53
- ]
54
- for key in ["v1.1-post", "v2.0-post"]
55
- }
56
- | {"other": []},
57
- },
58
- "dart": {
59
- "openapi": [],
60
- "schemas": [],
61
- "other":[],
62
- "request": {
63
- key: [
64
- ReplaceQueryIdPlaceholder(split=-1),
65
- AddSecuritySchemesOnHeader(split=-1),
66
- SetResponsesHeader(suffix=None),
67
- AddParametersOnParameters(
68
- split=-1,
69
- schemaType="string",
70
- ),
71
- ]
72
- for key in ["default", "user", "user-list", "tweet"]
73
- }
74
- | {
75
- key: [
76
- ReplaceQueryIdPlaceholder(split=-1),
77
- AddSecuritySchemesOnHeader(split=-1),
78
- SetResponsesHeader(suffix=None),
79
- AddParametersOnBody(
80
- split=-1,
81
- schemaType=None,
82
- contentType="application/json",
83
- ),
84
- ]
85
- for key in ["post"]
86
- }
87
- | {
88
- key: [
89
- SetResponsesHeader(suffix="legacy"),
90
- AddSecuritySchemesOnHeader(split=-1),
91
- AddParametersOnParameters(
92
- split=2,
93
- schemaType=None,
94
- ),
95
- ]
96
- for key in ["v1.1-get", "v2.0-get"]
97
- }
98
- | {
99
- key: [
100
- SetResponsesHeader(suffix="legacy"),
101
- AddSecuritySchemesOnHeader(split=-1),
102
- AddParametersOnBody(
103
- split=2,
104
- schemaType=None,
105
- contentType="application/x-www-form-urlencoded",
106
- ),
107
- ]
108
- for key in ["v1.1-post", "v2.0-post"]
109
- }
110
- | {"other": []},
111
- },
112
- "typescript": {
113
- "openapi": [AddSecuritySchemesOnSecuritySchemes()],
114
- "schemas": [],
115
- "other":[],
116
- "request": {
117
- key: [
118
- ReplaceQueryIdPlaceholder(split=-1),
119
- SetResponsesHeader(suffix=None),
120
- AddParametersOnParameters(
121
- split=-1,
122
- schemaType="string",
123
- ),
124
- ]
125
- for key in ["default", "user", "user-list", "tweet"]
126
- }
127
- | {
128
- key: [
129
- ReplaceQueryIdPlaceholder(split=-1),
130
- SetResponsesHeader(suffix=None),
131
- AddParametersOnBody(
132
- split=-1,
133
- schemaType=None,
134
- contentType="application/json",
135
- ),
136
- ]
137
- for key in ["post"]
138
- }
139
- | {
140
- key: [
141
- SetResponsesHeader(suffix="legacy"),
142
- AddParametersOnParameters(
143
- split=2,
144
- schemaType=None,
145
- ),
146
- ]
147
- for key in ["v1.1-get", "v2.0-get"]
148
- }
149
- | {
150
- key: [
151
- SetResponsesHeader(suffix="legacy"),
152
- AddParametersOnBody(
153
- split=2,
154
- schemaType=None,
155
- contentType="application/x-www-form-urlencoded",
156
- ),
157
- ]
158
- for key in ["v1.1-post", "v2.0-post"]
159
- }
160
- | {"other": []},
161
- },
162
- "test": {
163
- "openapi": [AddSecuritySchemesOnSecuritySchemes()],
164
- "schemas": [],
165
- "other":[],
166
- "request": {
167
- key: [
168
- ReplaceQueryIdPlaceholder(split=-1),
169
- SetResponsesHeader(suffix=None),
170
- AddParametersOnParameters(
171
- split=-1,
172
- schemaType="string",
173
- ),
174
- ]
175
- for key in ["default", "user", "user-list", "tweet"]
176
- }
177
- | {
178
- key: [
179
- ReplaceQueryIdPlaceholder(split=-1),
180
- SetResponsesHeader(suffix=None),
181
- AddParametersOnParameters(
182
- split=-1,
183
- schemaType="string",
184
- ),
185
- ]
186
- for key in ["post"]
187
- }
188
- | {
189
- key: [
190
- SetResponsesHeader(suffix="legacy"),
191
- AddParametersOnParameters(
192
- split=2,
193
- schemaType="object",
194
- ),
195
- ]
196
- for key in ["v1.1-get", "v1.1-post", "v2.0-get", "v2.0-post"]
197
- }
198
- | {"other": []},
199
- },
75
+ "docs": self.hooks_generator(),
76
+ "compatible": self.hooks_generator(queryParameterJson=False),
200
77
  }