Swagger UI unwrapping Spring Data `Pageable` with wrong field names
See original GitHub issueMy controller is the following:
@GetMapping
public ResponseEntity getAll(final @PageableDefault(sort = "id") Pageable pageable) {
return ResponseEntity.ok(null);
}
The resulting Swagger UI is:
It looks like it uses the Pageable
getters to infer those parameters, bypassing springfox-data-rest
configuration. Am I doing something wrong?
I am using Spring Boot 1.5.10.RELEASE and Springfox 2.9.2 with these dependencies:
<springfox-swagger2.version>2.9.2</springfox-swagger2.version>
[...]
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-core</artifactId>
<version>${springfox-swagger2.version}</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-spi</artifactId>
<version>${springfox-swagger2.version}</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-spring-web</artifactId>
<version>${springfox-swagger2.version}</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>${springfox-swagger2.version}</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-data-rest</artifactId>
<version>${springfox-swagger2.version}</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-bean-validators</artifactId>
<version>${springfox-swagger2.version}</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>${springfox-swagger2.version}</version>
</dependency>
Issue Analytics
- State:
- Created 5 years ago
- Reactions:17
- Comments:28 (4 by maintainers)
Top Results From Across the Web
Swagger shows wrong id field using Spring Data Rest
I'm using Spring Boot + Spring DATA REST and Swagger (Springfox 2.7.0). Spring DATA REST follows HATEOAS principles, so id field should ...
Read more >Swagger Documentation For Spring Pageable Interface
I am trying to provide an OpenAPI YAML from Spring Data Rest in order to generate client code. I noticed that something goes...
Read more >docs/release-notes.md · serv/springfox - Gitee.com
Support for Swagger 2.0. The swagger-ui webjar no longer requires a JSP engine. Powerful ways to include or exclude API endpoints using springfox.documentation....
Read more >Documenting a Spring Data REST API with Springfox and ...
A tutorial on how to document a REST API created with Spring Data REST using Springfox and Swagger.
Read more >Fix list for IBM WebSphere Application Server traditional V9
PH39398, SESN8558E Message giving wrong error details ... Request (CSR) is created with an extra information in the Subject Alternate Name(SAN) field.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Would be nice to have this feature.
What I came up a while ago was
and in the controller:
Hi, I can confirm this issue (with version 2.9.2). In the meantime I have solved it by providing implicit params (as shown below)