mirror of
https://github.com/fastapi/fastapi.git
synced 2026-01-01 18:47:55 -05:00
8 lines
271 B
Python
8 lines
271 B
Python
from typing import Any
|
|
|
|
|
|
def get_body_model_name(openapi: dict[str, Any], path: str) -> str:
|
|
body = openapi["paths"][path]["post"]["requestBody"]
|
|
body_schema = body["content"]["multipart/form-data"]["schema"]
|
|
return body_schema.get("$ref", "").split("/")[-1]
|