Skip to content

How to inject router in class? #127

Open
@fbrodrigorezino

Description

@fbrodrigorezino

Hi Yezz, I've been using version 2 for a long time.

And one of the reasons is that, as the name package suggests, I can use it as a class and inject it into different routers according to my code needs, tests, use inheritance, use as a container, etc.
But version 3 and above no longer use the class format, such as the Routable.

So I was using the end: app.include_router(container[IRestAPI].router)
How can I still use the fastapi-class as a class?

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions