mirror of
https://github.com/thegeneralist01/twitter-openapi
synced 2026-01-11 15:40:26 +01:00
remove hook
Signed-off-by: ふぁ <yuki@yuki0311.com>
This commit is contained in:
parent
80fd37679d
commit
2c07cb65e7
1 changed files with 0 additions and 17 deletions
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue