1
Fork 0
mirror of https://github.com/thegeneralist01/twitter-openapi synced 2026-03-09 18:30:08 +01:00

add removeLegacyDiscriminatorBehavior option

Signed-off-by: ふぁ <yuki@yuki0311.com>
This commit is contained in:
ふぁ 2024-02-15 14:41:50 +09:00
parent 1393042faf
commit 790efd0194
No known key found for this signature in database
GPG key ID: 83A8A5E74872A8AA
3 changed files with 6176 additions and 4 deletions

View file

@ -1,6 +1,7 @@
import yaml
import json
import yaml
class HookBase:
PLACEHOLDER: dict
@ -193,6 +194,13 @@ class AddPathQueryIdOnParameters(RequestHookBase):
return path, value
class RemoveErrorHandle(RequestHookBase):
def hook(self, path: str, value: dict):
content = value["responses"]["200"]["content"]["application/json"]
content["schema"] = content["schema"]["oneOf"][0]
return path, value
# OnParameters