From 2c07cb65e772ad7e3ab2788f66ed9a2ede29f4be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=B5=E3=81=81?= Date: Fri, 28 Jul 2023 02:18:39 +0900 Subject: [PATCH] remove hook MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ふぁ --- tools/hooks.py | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/tools/hooks.py b/tools/hooks.py index 03effcb..00bbdb8 100644 --- a/tools/hooks.py +++ b/tools/hooks.py @@ -109,23 +109,6 @@ class RemoveDiscriminator(SchemasHookBase): return value -class ReplaceLegacyDiscriminator(SchemasHookBase): - def hook(self, value: dict): - if value.get("oneOf") is not None: - value = { - "type": "object", - "example": ",".join( - list(x["$ref"].split("/")[-1] for x in value["oneOf"]) - ), - # "required": [value["discriminator"]["propertyName"]], - "properties": { - f"oneOf_schema_{x}_validator": y - for x, y in enumerate(value["oneOf"]) - }, - } - return value - - # RequestHookBase extends