https://github.com/apache/airflow/pull/27892 added Internal API as part of Webserver.

We need to introduce `airlfow internal-api` CLI command that starts Internal API as a independent component.
if request.path.startswith(base_path):
            return common_error_handler(ex)
        else:
            return views.method_not_allowed(ex)
    spec_dir = path.join(ROOT_APP_DIR, "api_connexion", "openapi")
    swagger_ui_dir = path.join(ROOT_APP_DIR, "www", "static", "dist", "swagger-ui")
    options = {
        "swagger_ui": conf.getboolean("webserver", "enable_swagger_ui", fallback=True),
        "swagger_path": swagger_ui_dir,
    }
    connexion_app = App(__name__, specification_dir=spec_dir, skip_error_handlers=True, options=options)
    connexion_app.app = app
    api_bp = connexion_app.add_api(
        specification="v1.yaml", base_path=base_path, validate_responses=True, strict_validation=True
    ).blueprint
    
    
    app.after_request_funcs.setdefault(api_bp.name, []).append(set_cors_headers_on_response)
    app.register_error_handler(ProblemException, common_error_handler)
    app.extensions["csrf"].exempt(api_bp)
def init_api_internal(app: Flask) -> None: