Closed
Description
Describe the bug
Pageable is documented to be used with Parameter(hidden) and PageableAsQueryParam.
When we add PageableDefault, the default page size should be 10 but is reported as 20.
To Reproduce
Steps to reproduce the behavior:
- What version of spring-boot you are using?
- 2.6.2
- What modules and versions of springdoc-openapi are you using?
- 1.6.3
- What is the actual and the expected result using OpenAPI Description (yml or json)?
actual
paths:
/api:
get:
tags:
- test-controller
operationId: findAll
parameters:
- name: page
in: query
description: Zero-based page index (0..N)
schema:
type: integer
default: 0
- name: size
in: query
description: The size of the page to be returned
schema:
type: integer
default: 20
expected
paths:
/api:
get:
tags:
- test-controller
operationId: findAll
parameters:
- name: page
in: query
description: Zero-based page index (0..N)
schema:
type: integer
default: 0
- name: size
in: query
description: The size of the page to be returned
schema:
type: integer
default: 10
- Provide with a sample code (HelloController) or Test that reproduces the problem
https://github.com/eiswind/openapi-pageable
Expected behavior
I expect d a default of 10. I guess we could have the same issue as well with the sort parameter.