docstr: Configure the API routes of the LightningFlow.
  
  Returns a list of HttpMethod such as Post or Get.
  
  .. code-block:: python
  
      from lightning.app import LightningFlow
      from lightning.app.api import Post
  
      from pydantic import BaseModel
  
  
      class HandlerModel(BaseModel):
          name: str
  
  
      class Flow(LightningFlow):
          def __init__(self):
              super().__init__()
              self.names = []
  
          def handler(self, config: HandlerModel) -> None:
              self.names.append(config.name)
  
          def configure_api(self):
              return [Post("/v1/api/request", self.handler)]
  
  Once the app is running, you can access the Swagger UI of the app
  under the ``/docs`` route.
docstr_tok: ["Configure","the","API","routes","of","the","LightningFlow",".","Returns","a","list","of","HttpMethod","such","as","Post","or","Get",".","..","code-block",":",":","python","from","lightning.app","import","LightningFlow","from","lightning.app.api","import","Post","from","pydantic","import","BaseModel","class","HandlerModel","(","BaseModel",")",":","name",":","str","class","Flow","(","LightningFlow",")",":","def","__init__","(","self",")",":","super","(",")",".__init__","(",")","self.names","=","[","]","def","handler","(","self",",","config",":","HandlerModel",")","-",">","None",":","self.names.append","(","config.name",")","def","configure_api","(","self",")",":","return","[","Post","(","``","\/v1\/api\/request","''",",","self.handler",")","]","Once","the","app","is","running",",","you","can","access","the","Swagger","UI","of","the","app","under","the","``","\/docs","``","route","."]
code: def configure_api(self) -> None:
      """Configure the API routes of the LightningFlow.
  
      Returns a list of HttpMethod such as Post or Get.
  
      .. code-block:: python
  
          from lightning.app import LightningFlow
          from lightning.app.api import Post
  
          from pydantic import BaseModel
  
  
          class HandlerModel(BaseModel):
              name: str
  
  
          class Flow(LightningFlow):
              def __init__(self):
                  super().__init__()
                  self.names = []
  
              def handler(self, config: HandlerModel) -> None:
                  self.names.append(config.name)
  
              def configure_api(self):
                  return [Post("/v1/api/request", self.handler)]
  
      Once the app is running, you can access the Swagger UI of the app
      under the ``/docs`` route.
  
      """
      raise NotImplementedError
  
imports: import inspect
  import warnings
  from copy import deepcopy
  from datetime import datetime
  from types import FrameType
  from typing import TYPE_CHECKING, Any, Dict, Generator, Iterable, List, Optional, Tuple, Union, cast
  from deepdiff import DeepHash
  from lightning.app.core.work import LightningWork
  from lightning.app.frontend import Frontend
  from lightning.app.storage.drive import Drive, _maybe_create_drive
  from lightning.app.storage.path import Path
  from lightning.app.utilities.app_helpers import _is_json_serializable, _LightningAppRef, _set_child_name, is_overridden
  from lightning.app.utilities.component import _sanitize_state
  from lightning.app.utilities.exceptions import ExitAppException, LightningFlowException
  from lightning.app.utilities.introspection import _is_init_context, _is_run_context
  from lightning.app.utilities.packaging.cloud_compute import CloudCompute, _maybe_create_cloud_compute
label_desc: Use image node_id 28 for calling the LightningFlow obj's underlying member method code with example usage: obj.configure_api() without return types