I'm failing at documenting my Spring Data REST API with OpenAPI. Nothing show in swagger-ui's homepage (and /v3/api-docs obviously).
Here is an excerpt from my dependencies:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-rest</artifactId>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<version>1.6.4</version>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-data-rest</artifactId>
<version>1.6.4</version>
</dependency>
And there is my JPA repository:
@RepositoryRestResource(collectionResourceRel = "people", path = "people")
public interface PersonsRepository extends JpaRepository<Person, Long> {
Person findByLastname(@Param("name") @RequestParam("name") String lastname);
}
And this my Spring Boot setup:
spring.datasource.url=jdbc:h2:mem:testdb;DATABASE_TO_UPPER=false
spring.jpa.defer-datasource-initialization=true
spring.jpa.open-in-view=false
management.endpoints.web.exposure.include=*
springdoc.swagger-ui.operationsSorter=method
#springdoc.paths-to-match=/people/**
Of course, my CRUD API is ok over /people PATH. Even the /profile/people PATH seems right.
I must be missing something... Thanks for any help.