How can I show all OpenAPI specs while I keep a single swaggerui page?

Hi, I’m a ash-newbie trying to get my head around the whole framework.

Right now I’m experimenting with AshJsonApi, and my understanding is that you can create a router for each API or connect multiple APIs on one router.

However, I want to keep only one SwaggerUI document even if I create multiple routers. Currently, it seems to expose a separate /open_api path for each router. Should I not create multiple routers in this case, or is there a way to combine them?

You should be able to list multiple apis into a single router.

use AshJsonApi.Api.Router,
    # The api modules you want to serve
    apis: [Helpdesk.Support], # include each api here
    # optionally a json_schema route
    json_schema: "/json_schema",
    # optionally an open_api route
    open_api: "/open_api"

Thanks for clarifying. I know that already reading documents, but didn’t sure about that’s best solution because the naming in documents seems like it matches Api modules and if I integrate several Api modules in one router, I have to come up with proper naming for the router. But now I get it and I keep only one router for my app.

Thanks again and hope you well :smiley:

1 Like

Yes I can see how that would be confusing!

1 Like