1

I have a 3-module Springboot multi-module maven project with a structure like so:

parent
|- module 1
|- module 2
|- module 3

The maven dependency for spring-openapi is in the parent pom, while the main class is in module 1.

The problem is that when I examine the Swagger api, I only see the documentation for the rest endpoints from module 1, and not those in 2 or 3.

I experimented by putting the openapi dependency in module 3 and re-building but that doesn't make a difference. Is it not possible to get all the rest-endpoints across all modules published all at once?

Some more info: here are some properties from my application.properties:

springdoc.packagesToScan=com.sxxxxxxxxx
springdoc.pathsToMatch=/a/**, /d/**

These are my dependencies:

        <dependency>
            <groupId>org.springdoc</groupId>
            <artifactId>springdoc-openapi-ui</artifactId>
            <version>1.6.9</version>
        </dependency>

        <dependency>
            <groupId>org.springdoc</groupId>
            <artifactId>springdoc-openapi-security</artifactId>
            <version>1.6.9</version>
        </dependency>

I thought that this Q&A might help (but it didnt): OpenAPI & spring-doc not finding all mappings in a controller class

I've been doing some experimentation:

  1. I added a Test Controller, and it appeared in the docs. Then I deleted the Test Controller from the code base, but it still appears in the docs
  2. I've changed the http response codes to some of the endpoints in the documentation, but those aren't picked up.

It almost seems like once it does the initial generation of documentation for a rest controller, it forgets about looking at it again for any further changes.

Does any one have an idea?

Thanks

Kash.
  • 242
  • 1
  • 3
  • 15

0 Answers0