Springdoc with multiple api-docs

8.7k views Asked by At

I want to group three API docs in one swagger-ui. I use Springdoc. Each of the three API-docs has its own url. (They are not in the same project). Is there a way to do this?

Edit: It's now working this way:

springdoc:
  swagger-ui:
    path: /
    urls:
      - name: App1
        url: http://app1.domain.com/v3/api-docs
      - name: App2
        url: http://app2.domain.com/v3/api-docs
      - name: App3
        url: http://app3.domain.com/v3/api-docs
1

There are 1 answers

1
brianbro On BEST ANSWER

The answer is already available on the F.A.Q:

The properties springdoc.swagger-ui.urls.*, are suitable to configure external (/v3/api-docs url):

  • For example if you want to agreagte all the endpoints of other services, inside one single application. Don’t forget that CORS needs to be enabled as well.

Details of the properties are available here: