1
Fork 0
mirror of https://github.com/thegeneralist01/twitter-openapi synced 2026-01-11 23:50:26 +01:00

fix create tweet schema

Signed-off-by: ふぁ <yuki@yuki0311.com>
This commit is contained in:
ふぁ 2024-11-02 04:43:38 +09:00
parent 996bf5798e
commit 3de1deeb8b
No known key found for this signature in database
GPG key ID: 83A8A5E74872A8AA
4 changed files with 2 additions and 7 deletions

View file

@ -18,7 +18,8 @@ class HookBase:
return x[:-1] if x.endswith("?") else x
if isinstance(obj, dict):
req = {k: v for k, v in obj.items() if not k.endswith("?")}
ignore_req = [k[:-1] for k in obj.keys() if k.endswith("?")]
req = [k for k in obj.keys() if fn(k) not in ignore_req]
properties = {fn(k): mine(v) for k, v in obj.items()}
value = {
"type": "object",