Skip to content

Commit 995bac6

Browse files
committed
upgrade spring-boot to version 4.0.3
1 parent 065969c commit 995bac6

17 files changed

Lines changed: 135 additions & 6 deletions

File tree

springdoc-openapi-starter-common/src/main/java/org/springdoc/core/data/DataRestOperationService.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,8 @@ private Operation buildSearchOperation(HandlerMethod handlerMethod, DataRestRepo
215215
Parameter parameter = getParameterFromAnnotations(openAPI, methodAttributes, method, pName);
216216
if (parameter == null) {
217217
parameter = new Parameter().name(pName).in(ParameterIn.QUERY.toString()).schema(schema);
218-
operation.addParametersItem(parameter);
219218
}
220-
else if (CollectionUtils.isEmpty(operation.getParameters()))
219+
if (CollectionUtils.isEmpty(operation.getParameters()))
221220
operation.addParametersItem(parameter);
222221
else
223222
GenericParameterService.mergeParameter(operation.getParameters(), parameter);

springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/3.0.1/app10.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
{
8282
"name": "customer",
8383
"in": "query",
84+
"required": true,
8485
"schema": {
8586
"$ref": "#/components/schemas/Customer"
8687
}
@@ -550,6 +551,7 @@
550551
{
551552
"name": "lastname",
552553
"in": "query",
554+
"required": true,
553555
"schema": {
554556
"type": "string"
555557
}

springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/3.0.1/app11.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
{
8989
"name": "name",
9090
"in": "query",
91+
"required": true,
9192
"schema": {
9293
"type": "string"
9394
}

springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/3.0.1/app16.json

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,9 @@
9999
{
100100
"name": "customer",
101101
"in": "query",
102+
"required": true,
102103
"schema": {
103-
"$ref": "#/components/schemas/CustomerRequestBody"
104+
"$ref": "#/components/schemas/Customer"
104105
}
105106
}
106107
],
@@ -665,6 +666,7 @@
665666
{
666667
"name": "lastname",
667668
"in": "query",
669+
"required": true,
668670
"schema": {
669671
"type": "string"
670672
}
@@ -1017,6 +1019,21 @@
10171019
}
10181020
}
10191021
},
1022+
"Customer": {
1023+
"type": "object",
1024+
"properties": {
1025+
"id": {
1026+
"type": "integer",
1027+
"format": "int64"
1028+
},
1029+
"firstname": {
1030+
"type": "string"
1031+
},
1032+
"lastname": {
1033+
"type": "string"
1034+
}
1035+
}
1036+
},
10201037
"EntityModelAccount": {
10211038
"type": "object",
10221039
"properties": {

springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/3.0.1/app20.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@
149149
{
150150
"name": "code",
151151
"in": "query",
152+
"required": true,
152153
"schema": {
153154
"type": "string"
154155
}

springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/3.0.1/app21.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@
9090
"name": "firstName",
9191
"in": "query",
9292
"description": "this is for first Name",
93+
"required": true,
9394
"schema": {
9495
"type": "string"
9596
}
@@ -136,6 +137,7 @@
136137
{
137138
"name": "lastName",
138139
"in": "query",
140+
"required": true,
139141
"schema": {
140142
"type": "string"
141143
}

springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/3.0.1/app26.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
{
8989
"name": "name",
9090
"in": "query",
91+
"required": true,
9192
"schema": {
9293
"type": "string"
9394
}

springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/3.0.1/app34.json

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,9 @@
9696
{
9797
"name": "customer",
9898
"in": "query",
99+
"required": true,
99100
"schema": {
100-
"$ref": "#/components/schemas/CustomerRequestBody"
101+
"$ref": "#/components/schemas/Customer"
101102
}
102103
}
103104
],
@@ -649,6 +650,7 @@
649650
{
650651
"name": "lastname",
651652
"in": "query",
653+
"required": true,
652654
"schema": {
653655
"type": "string"
654656
}
@@ -1190,6 +1192,43 @@
11901192
}
11911193
}
11921194
},
1195+
"Account": {
1196+
"type": "object",
1197+
"properties": {
1198+
"id": {
1199+
"type": "integer",
1200+
"format": "int64"
1201+
},
1202+
"customer": {
1203+
"$ref": "#/components/schemas/Customer"
1204+
},
1205+
"expiryDate": {
1206+
"type": "string",
1207+
"format": "date-time"
1208+
}
1209+
}
1210+
},
1211+
"Customer": {
1212+
"type": "object",
1213+
"properties": {
1214+
"id": {
1215+
"type": "integer",
1216+
"format": "int64"
1217+
},
1218+
"firstname": {
1219+
"type": "string"
1220+
},
1221+
"lastname": {
1222+
"type": "string"
1223+
},
1224+
"accounts": {
1225+
"type": "array",
1226+
"items": {
1227+
"$ref": "#/components/schemas/Account"
1228+
}
1229+
}
1230+
}
1231+
},
11931232
"EntityModelAccount": {
11941233
"type": "object",
11951234
"properties": {

springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/3.0.1/app36.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
{
2222
"name": "enumField",
2323
"in": "query",
24+
"required": true,
2425
"schema": {
2526
"type": "string",
2627
"enum": [
@@ -57,6 +58,7 @@
5758
{
5859
"name": "enumFields",
5960
"in": "query",
61+
"required": true,
6062
"schema": {
6163
"type": "array",
6264
"items": {

springdoc-openapi-tests/springdoc-openapi-data-rest-tests/src/test/resources/results/3.1.0/app10.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
{
8282
"name": "customer",
8383
"in": "query",
84+
"required": true,
8485
"schema": {
8586
"$ref": "#/components/schemas/Customer"
8687
}
@@ -550,6 +551,7 @@
550551
{
551552
"name": "lastname",
552553
"in": "query",
554+
"required": true,
553555
"schema": {
554556
"type": "string"
555557
}

0 commit comments

Comments
 (0)