chore: validate param type of application/json when call a webhook (#25074)

This commit is contained in:
非法操作
2025-09-03 15:49:07 +08:00
committed by GitHub
parent 7120c6414c
commit 2013ceb9d2
4 changed files with 363 additions and 40 deletions

View File

@ -35,7 +35,17 @@ class WebhookBodyParameter(BaseModel):
"""Body parameter with type information."""
name: str
type: Literal["string", "number", "boolean", "object", "array", "file"] = "string"
type: Literal[
"string",
"number",
"boolean",
"object",
"array[string]",
"array[number]",
"array[boolean]",
"array[object]",
"file",
] = "string"
required: bool = False