Skip to content

'ConnexionMiddleware' object has no attribute 'routes' #102

@lasoama

Description

@lasoama

Hi,

it seems there is an issue when trying to use MetricsMiddleware alongside with AsyncApp from connexion.
It returns the error: 'ConnexionMiddleware' object has no attribute 'routes'.

connexion==3.2.0
aioprometheus==23.12.0 with extras aiohttp and starlette

    connexion_app = AsyncApp(__name__, specification_dir="api")
    connexion_app.add_api("openapi.yaml", validate_responses=True, base_path=base_path)

    connexion_app.add_middleware(MetricsMiddleware)

    return connexion_app

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions