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

remove hook

Signed-off-by: ふぁ <yuki@yuki0311.com>
This commit is contained in:
ふぁ 2023-07-28 02:18:39 +09:00
parent 80fd37679d
commit 2c07cb65e7
No known key found for this signature in database
GPG key ID: 83A8A5E74872A8AA

View file

@ -109,23 +109,6 @@ class RemoveDiscriminator(SchemasHookBase):
return value 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 # RequestHookBase extends