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:
parent
1393042faf
commit
790efd0194
3 changed files with 6176 additions and 4 deletions
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue