Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 1
    That's an unexcpected answer, and it seems to fit what I was looking for. It's quite surprising that add_api_route is no documented at all ; dynamic routes seem to be such a valued feature! Commented Oct 12, 2022 at 9:32
  • 2
    How do you "invalidate the cache of the OpenAPI endpoint."? And is it possible to do dynamically add a GraphQL endpoint in a similar way (using Graphene)? Commented Feb 10, 2023 at 14:07
  • 3
    @JayjayJay To invalidate the cache and reload the new app specs: app.openapi_schema = None; app.setup() Commented Oct 31, 2023 at 12:08