File tree Expand file tree Collapse file tree 5 files changed +254
-117
lines changed
springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration
springdoc-openapi-data-rest-tests/src/test/resources/results
springdoc-openapi-hateoas-tests/src/test/resources/results Expand file tree Collapse file tree 5 files changed +254
-117
lines changed Original file line number Diff line number Diff line change 27
27
import java .util .Optional ;
28
28
29
29
import org .springdoc .core .converters .SortOpenAPIConverter ;
30
- import org .springdoc .core .converters .models .SortObject ;
31
30
import org .springdoc .core .customizers .DataRestDelegatingMethodParameterCustomizer ;
32
31
import org .springdoc .core .providers .ObjectMapperProvider ;
33
32
import org .springdoc .core .providers .RepositoryRestConfigurationProvider ;
@@ -71,7 +70,6 @@ public class SpringDocSortConfiguration {
71
70
@ Lazy (false )
72
71
SortOpenAPIConverter sortOpenAPIConverter (ObjectMapperProvider objectMapperProvider ) {
73
72
getConfig ().replaceParameterObjectWithClass (org .springframework .data .domain .Sort .class , org .springdoc .core .converters .models .Sort .class );
74
- getConfig ().replaceWithClass (org .springframework .data .domain .Sort .class , SortObject .class );
75
73
return new SortOpenAPIConverter (objectMapperProvider );
76
74
}
77
75
Original file line number Diff line number Diff line change 105
105
"format" : " int32"
106
106
},
107
107
"sort" : {
108
- "type" : " array" ,
109
- "items" : {
110
- "$ref" : " #/components/schemas/SortObject"
111
- }
112
- },
113
- "first" : {
114
- "type" : " boolean"
108
+ "$ref" : " #/components/schemas/SortObject"
115
109
},
116
110
"last" : {
117
111
"type" : " boolean"
118
112
},
119
113
"pageable" : {
120
114
"$ref" : " #/components/schemas/PageableObject"
121
115
},
116
+ "first" : {
117
+ "type" : " boolean"
118
+ },
122
119
"numberOfElements" : {
123
120
"type" : " integer" ,
124
121
"format" : " int32"
136
133
"format" : " int64"
137
134
},
138
135
"sort" : {
139
- "type" : " array" ,
140
- "items" : {
141
- "$ref" : " #/components/schemas/SortObject"
142
- }
143
- },
144
- "paged" : {
145
- "type" : " boolean"
146
- },
147
- "unpaged" : {
148
- "type" : " boolean"
136
+ "$ref" : " #/components/schemas/SortObject"
149
137
},
150
138
"pageNumber" : {
151
139
"type" : " integer" ,
154
142
"pageSize" : {
155
143
"type" : " integer" ,
156
144
"format" : " int32"
145
+ },
146
+ "paged" : {
147
+ "type" : " boolean"
148
+ },
149
+ "unpaged" : {
150
+ "type" : " boolean"
157
151
}
158
152
}
159
153
},
160
154
"SortObject" : {
161
155
"type" : " object" ,
162
156
"properties" : {
163
- "direction" : {
164
- "type" : " string"
165
- },
166
- "nullHandling" : {
167
- "type" : " string"
168
- },
169
- "ascending" : {
157
+ "empty" : {
170
158
"type" : " boolean"
171
159
},
172
- "property " : {
173
- "type" : " string "
160
+ "sorted " : {
161
+ "type" : " boolean "
174
162
},
175
- "ignoreCase " : {
163
+ "unsorted " : {
176
164
"type" : " boolean"
177
165
}
178
166
}
Original file line number Diff line number Diff line change 63
63
"format" : " int64"
64
64
},
65
65
"sort" : {
66
- "type" : " array" ,
67
- "items" : {
68
- "$ref" : " #/components/schemas/SortObject"
69
- }
70
- },
71
- "paged" : {
72
- "type" : " boolean"
73
- },
74
- "unpaged" : {
75
- "type" : " boolean"
66
+ "$ref" : " #/components/schemas/SortObject"
76
67
},
77
68
"pageNumber" : {
78
69
"type" : " integer" ,
81
72
"pageSize" : {
82
73
"type" : " integer" ,
83
74
"format" : " int32"
75
+ },
76
+ "paged" : {
77
+ "type" : " boolean"
78
+ },
79
+ "unpaged" : {
80
+ "type" : " boolean"
84
81
}
85
82
}
86
83
},
87
84
"SortObject" : {
88
85
"type" : " object" ,
89
86
"properties" : {
90
- "direction" : {
91
- "type" : " string"
92
- },
93
- "nullHandling" : {
94
- "type" : " string"
95
- },
96
- "ascending" : {
87
+ "empty" : {
97
88
"type" : " boolean"
98
89
},
99
- "property " : {
100
- "type" : " string "
90
+ "sorted " : {
91
+ "type" : " boolean "
101
92
},
102
- "ignoreCase " : {
93
+ "unsorted " : {
103
94
"type" : " boolean"
104
95
}
105
96
}
Original file line number Diff line number Diff line change 219
219
"type" : " integer" ,
220
220
"format" : " int64"
221
221
},
222
- "pageable" : {
223
- "$ref" : " #/components/schemas/PageableObject"
224
- },
225
- "first" : {
226
- "type" : " boolean"
227
- },
228
- "last" : {
229
- "type" : " boolean"
230
- },
231
222
"size" : {
232
223
"type" : " integer" ,
233
224
"format" : " int32"
243
234
"format" : " int32"
244
235
},
245
236
"sort" : {
246
- "type" : " array" ,
247
- "items" : {
248
- "$ref" : " #/components/schemas/SortObject"
249
- }
237
+ "$ref" : " #/components/schemas/SortObject"
238
+ },
239
+ "pageable" : {
240
+ "$ref" : " #/components/schemas/PageableObject"
241
+ },
242
+ "first" : {
243
+ "type" : " boolean"
244
+ },
245
+ "last" : {
246
+ "type" : " boolean"
250
247
},
251
248
"numberOfElements" : {
252
249
"type" : " integer" ,
260
257
"PageableObject" : {
261
258
"type" : " object" ,
262
259
"properties" : {
260
+ "offset" : {
261
+ "type" : " integer" ,
262
+ "format" : " int64"
263
+ },
264
+ "sort" : {
265
+ "$ref" : " #/components/schemas/SortObject"
266
+ },
263
267
"paged" : {
264
268
"type" : " boolean"
265
269
},
266
- "pageNumber" : {
267
- "type" : " integer" ,
268
- "format" : " int32"
270
+ "unpaged" : {
271
+ "type" : " boolean"
269
272
},
270
273
"pageSize" : {
271
274
"type" : " integer" ,
272
275
"format" : " int32"
273
276
},
274
- "offset " : {
277
+ "pageNumber " : {
275
278
"type" : " integer" ,
276
- "format" : " int64"
277
- },
278
- "sort" : {
279
- "type" : " array" ,
280
- "items" : {
281
- "$ref" : " #/components/schemas/SortObject"
282
- }
283
- },
284
- "unpaged" : {
285
- "type" : " boolean"
279
+ "format" : " int32"
286
280
}
287
281
}
288
282
},
289
283
"SortObject" : {
290
284
"type" : " object" ,
291
285
"properties" : {
292
- "direction" : {
293
- "type" : " string"
294
- },
295
- "nullHandling" : {
296
- "type" : " string"
297
- },
298
- "ascending" : {
286
+ "empty" : {
299
287
"type" : " boolean"
300
288
},
301
- "property " : {
302
- "type" : " string "
289
+ "unsorted " : {
290
+ "type" : " boolean "
303
291
},
304
- "ignoreCase " : {
292
+ "sorted " : {
305
293
"type" : " boolean"
306
294
}
307
295
}
317
305
"type" : " integer" ,
318
306
"format" : " int64"
319
307
},
320
- "pageable" : {
321
- "$ref" : " #/components/schemas/PageableObject"
322
- },
323
- "first" : {
324
- "type" : " boolean"
325
- },
326
- "last" : {
327
- "type" : " boolean"
328
- },
329
308
"size" : {
330
309
"type" : " integer" ,
331
310
"format" : " int32"
341
320
"format" : " int32"
342
321
},
343
322
"sort" : {
344
- "type" : " array" ,
345
- "items" : {
346
- "$ref" : " #/components/schemas/SortObject"
347
- }
323
+ "$ref" : " #/components/schemas/SortObject"
324
+ },
325
+ "pageable" : {
326
+ "$ref" : " #/components/schemas/PageableObject"
327
+ },
328
+ "first" : {
329
+ "type" : " boolean"
330
+ },
331
+ "last" : {
332
+ "type" : " boolean"
348
333
},
349
334
"numberOfElements" : {
350
335
"type" : " integer" ,
366
351
"type" : " integer" ,
367
352
"format" : " int64"
368
353
},
369
- "pageable" : {
370
- "$ref" : " #/components/schemas/PageableObject"
371
- },
372
- "first" : {
373
- "type" : " boolean"
374
- },
375
- "last" : {
376
- "type" : " boolean"
377
- },
378
354
"size" : {
379
355
"type" : " integer" ,
380
356
"format" : " int32"
390
366
"format" : " int32"
391
367
},
392
368
"sort" : {
393
- "type" : " array" ,
394
- "items" : {
395
- "$ref" : " #/components/schemas/SortObject"
396
- }
369
+ "$ref" : " #/components/schemas/SortObject"
370
+ },
371
+ "pageable" : {
372
+ "$ref" : " #/components/schemas/PageableObject"
373
+ },
374
+ "first" : {
375
+ "type" : " boolean"
376
+ },
377
+ "last" : {
378
+ "type" : " boolean"
397
379
},
398
380
"numberOfElements" : {
399
381
"type" : " integer" ,
406
388
}
407
389
}
408
390
}
409
- }
391
+ }
You can’t perform that action at this time.
0 commit comments