Commit f43b81e
authored
[JAVA-SPRING,KOTLIN-SPRING] - feature: validate Pageable params [size, page, sort] and preserve defaults; add PagedModel<T> support; Add 'autoXSpringPaginated' to java-spring (#23575)
* feat: add sort validation support for pageable operations
* add sample
* add generated samples
* add to compiled samples
* add to compiled samples
* regenerate docs
* feat: add pageable defaults validation for pageable operations
* feat: enhance pageable validation with sort enum support
* feat: add pageable constraint validation tests for size and page limits
* update samples
* update samples & fix test
* feat: add validation for pageable and sort parameters with new annotations
* simplify implementation
* improve doc description
* improve sample
* rename from non-existent 'beanValidations' to 'useBeanValidation'
* feat: add enum validation for pageable sort parameters in API
* add tests for both exploded and non-exploded params
* fix samples after fix
* add spring-boot-starter-validation when useBeanValidation
* add java spring test and delete incorrect sample
* modify sample
* add tests
* add java samples
* add java samples
* add tests to java samples
* add missing tests for autoXSpringPaginated in java spring
* add to built samples
* fix: guard ValidPageable validator against Pageable.unpaged()
Calling getPageSize()/getPageNumber() on Pageable.unpaged() throws
UnsupportedOperationException. Add an isPaged() check so unpaged
requests pass validation without error.
* fix javadoc
* remove unused import
* add implementation to detect schemas matching PageModel shape and replace with generic
* add implementation to detect schemas matching PageModel shape and replace with generic
* keep original implementation conditionally when needed by @apiresponse annotation for springdoc
* update samples
* update Spring Boot version to 3.3.13 in build files
* try to compile samples
* delete samples
* fix sample
* delete generated sample
* fix kotlin sample
* regenerate docs
* update samples
* fix generation suppresion logic and regenerate samples
* update samples1 parent b41e290 commit f43b81e
File tree
198 files changed
+10309
-35
lines changed- .github/workflows
- bin/configs
- unmaintained
- docs
- generators
- modules/openapi-generator/src
- main
- java/org/openapitools/codegen/languages
- resources
- JavaSpring
- kotlin-spring
- libraries/spring-boot
- test
- java/org/openapitools/codegen
- java/spring
- kotlin/spring
- languages
- resources/3_0/spring
- samples/server/petstore
- kotlin-spring-default
- kotlin-spring-sealed-interfaces
- kotlin-springboot-3-no-response-entity
- kotlin-springboot-3
- kotlin-springboot-4
- kotlin-springboot-additionalproperties
- kotlin-springboot-bigdecimal-default
- kotlin-springboot-delegate-nodefaults
- kotlin-springboot-delegate
- kotlin-springboot-include-http-request-context-delegate
- src/main/kotlin/org/openapitools/api
- kotlin-springboot-integer-enum
- kotlin-springboot-modelMutable
- kotlin-springboot-multipart-request-model
- kotlin-springboot-no-response-entity-delegate
- kotlin-springboot-no-response-entity
- kotlin-springboot-paged-model
- .openapi-generator
- gradle/wrapper
- src/main/kotlin/org/openapitools
- api
- configuration
- model
- kotlin-springboot-reactive-without-flow
- kotlin-springboot-reactive
- kotlin-springboot-request-cookie
- kotlin-springboot-sort-validation
- .openapi-generator
- gradle/wrapper
- src
- main/kotlin/org/openapitools
- api
- configuration
- model
- test/kotlin/org/openapitools/api
- kotlin-springboot-source-swagger1
- kotlin-springboot-source-swagger2
- kotlin-springboot-x-kotlin-implements
- src/main/kotlin/org/openapitools/api
- kotlin-springboot
- springboot-paged-model
- .openapi-generator
- src/main/java/org/openapitools
- api
- configuration
- model
- springboot-sort-validation
- .openapi-generator
- src
- main
- java/org/openapitools
- api
- configuration
- model
- resources
- test
- java/org/openapitools
- api
- resources
- springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api
- springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api
- springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api
- springboot-spring-pageable/src/main/java/org/openapitools/api
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
198 files changed
+10309
-35
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| 28 | + | |
| 29 | + | |
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
| |||
62 | 66 | | |
63 | 67 | | |
64 | 68 | | |
| 69 | + | |
| 70 | + | |
65 | 71 | | |
66 | 72 | | |
67 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| 34 | + | |
| 35 | + | |
32 | 36 | | |
33 | 37 | | |
34 | 38 | | |
| |||
52 | 56 | | |
53 | 57 | | |
54 | 58 | | |
| 59 | + | |
| 60 | + | |
55 | 61 | | |
56 | 62 | | |
57 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
0 commit comments