Debian Codegraph @

tests/test_request_params/test_form/utils.py

raw
1 from typing import Any
2
3
4 def get_body_model_name(openapi: dict[str, Any], path: str) -> str:
5 body = openapi["paths"][path]["post"]["requestBody"]
6 body_schema = body["content"]["application/x-www-form-urlencoded"]["schema"]
7 return body_schema.get("$ref", "").split("/")[-1]