Passing APIRouter tags to the fast-api DaprActor
See original GitHub issueDescribe the proposal
The routes from the DaprActor appears in the openapi documentation so i think the library should allow to pass the router tags or supply default tags in order to differentiate the Actor routes from the application routes The new Actor should look like:
class DaprActor(object):
def __init__(self, app: FastAPI, router_tags: List[str]): <----- New
self._dapr_serializer = DefaultJSONSerializer()
self._router = APIRouter(tags=tags) <----- New
self.init_routes(self._router)
app.include_router(self._router)
......
Will now look like
Issue Analytics
- State:
- Created a year ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Bigger Applications - Multiple Files - FastAPI
You can think of APIRouter as a "mini FastAPI " class. All the same options are supported. All the same parameters , responses...
Read more >routes appear under tag of Apirouter and parent Apirouter #2492
I already checked if it is not related to FastAPI but to Swagger UI. ... for the passed router into its existing ones,...
Read more >How to use the fastapi.APIRouter function in fastapi - Snyk
To help you get started, we've selected a few fastapi.APIRouter examples, based on popular ways it is used in public projects.
Read more >Dapr Python SDK integration with FastAPI
How to create Dapr Python virtual actors and pubsub with the FastAPI extension. The Dapr Python SDK provides integration with FastAPI using the ......
Read more >How to pass extra data to fastapi APIRouter? - Stack Overflow
Though I don't like it, I modified my App class as following to get around the problem - still looking for cleaner solution....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Used only for the swagger docs. The swagger docs don’t show anything else about it https://fastapi.tiangolo.com/tutorial/bigger-applications/?h=tags#add-some-custom-tags-responses-and-dependencies https://fastapi.tiangolo.com/tutorial/metadata/?h=tags#use-your-tags
@berndverst I’ve commented on your pull request if there is something you don’t agree with then please let me know (Its my first pull request in an open source)