MCPcopy Create free account
hub / github.com/Flagsmith/flagsmith / get_generator_class

Method get_generator_class

api/api/openapi_views.py:15–21  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

13 """
14
15 def get_generator_class(self) -> type:
16 try:
17 if self.request.query_params["mcp"].lower() == "true": # type: ignore[attr-defined]
18 return MCPSchemaGenerator
19 except (AttributeError, KeyError):
20 pass
21 return SchemaGenerator
22
23 def get(self, request: Request, *args: Any, **kwargs: Any) -> Response:
24 self.generator_class = self.get_generator_class()

Calls

no outgoing calls