MCPcopy
hub / github.com/encode/starlette / _remove_converter

Method _remove_converter

starlette/schemas.py:89–96  ·  view source on GitHub ↗

Remove the converter from the path. For example, a route like this: Route("/users/{id:int}", endpoint=get_user, methods=["GET"]) Should be represented as `/users/{id}` in the OpenAPI schema.

(self, path: str)

Source from the content-addressed store, hash-verified

87 return endpoints_info
88
89 def _remove_converter(self, path: str) -> str:
90 """
91 Remove the converter from the path.
92 For example, a route like this:
93 Route("/users/{id:int}", endpoint=get_user, methods=["GET"])
94 Should be represented as `/users/{id}` in the OpenAPI schema.
95 """
96 return _remove_converter_pattern.sub("}", path)
97
98 def parse_docstring(self, func_or_method: Callable[..., Any]) -> dict[str, Any]:
99 """

Callers 1

get_endpointsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected