mirror of
https://github.com/thegeneralist01/twitter-openapi
synced 2026-01-11 23:50:26 +01:00
remove removeLegacyDiscriminatorBehavior
This commit is contained in:
parent
5a50d9d53e
commit
28b4dbcaf5
3 changed files with 12 additions and 28 deletions
|
|
@ -125,11 +125,11 @@ class RequestHookBase(HookBase):
|
|||
# SchemasHookBase extends
|
||||
|
||||
|
||||
class RemoveDiscriminator(SchemasHookBase):
|
||||
def hook(self, value: dict):
|
||||
if value.get("discriminator") is not None:
|
||||
del value["discriminator"]
|
||||
return value
|
||||
# class RemoveDiscriminator(SchemasHookBase):
|
||||
# def hook(self, value: dict):
|
||||
# if value.get("discriminator") is not None:
|
||||
# del value["discriminator"]
|
||||
# return value
|
||||
|
||||
|
||||
class SchemasCheck(SchemasHookBase):
|
||||
|
|
@ -218,11 +218,11 @@ 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
|
||||
# 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