You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When document spring data rest repositories with @RepositoryRestResource, methods declared by CrudRepository or PagingAndSortingRepository are ignored by springdoc. Custom methods works fine.
To Reproduce
Declare RepositoryRestResource repository, and annotate method inherit from PagingAndSourtingRepository, for example, findById with @Operation or @ApiResponses:
This has never been supported. As the majority of use cases, people do not override the base repositories !
They only add the search methods, which are supported out of the box.
See the initial support here for more details
Your proposal doesn't look achievable with the current implementation.
For example, how would you address: The save / patch / put endpoints which are different per entity, but relies on the same repository method save(S entity)?
If you find a solution for that, feel free to propose directly a PR.
Note that the only Straightforward solution, where you can add your desired changes at the operation level for the spring-data-rest existing endpoints is OpenApiCustomiser.
And perhaps findById isn´t the best example. For example, method Page<T> findAll(Predicate predicate, Pageable pageable);
is from base repository QuerydslPredicateExecutor from spring data:
Describe the bug
When document spring data rest repositories with
@RepositoryRestResource
, methods declared by CrudRepository or PagingAndSortingRepository are ignored by springdoc. Custom methods works fine.To Reproduce
Declare RepositoryRestResource repository, and annotate method inherit from PagingAndSourtingRepository, for example, findById with
@Operation
or@ApiResponses
:Expected behavior
When call to
/v3/api-docs
,paths['/peopleme/{id}'].get.description
must be description declared by@Operation
annotation.You can check issue in:
https://github.com/migueltercero/springdoc-issue
https://github.com/migueltercero/springdoc-issue/blob/master/src/test/java/test/org/springdoc/api/app21/PersonRepositoryTest.java
The text was updated successfully, but these errors were encountered: