Skip to content

Commit 10431d3

Browse files
author
bnasslahsen
committed
fix some failing tests after spring upgrade
1 parent 4d73fa4 commit 10431d3

File tree

12 files changed

+122
-207
lines changed

12 files changed

+122
-207
lines changed

springdoc-openapi-data-rest/src/test/java/test/org/springdoc/api/app9/core/config/WebMvcConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class WebMvcConfiguration implements WebMvcConfigurer {
1414
@Override
1515
public void addCorsMappings(CorsRegistry registry) {
1616
registry.addMapping("/**") //
17-
.allowedOrigins("*") //
17+
.allowedOrigins("http://localhost") //
1818
.allowedMethods("GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS") //
1919
.allowedHeaders("*") //
2020
.allowCredentials(true) //

springdoc-openapi-data-rest/src/test/resources/application-test.properties

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,3 @@
1-
#
2-
# /*
3-
# * Copyright 2019-2020 the original author or authors.
4-
# *
5-
# * Licensed under the Apache License, Version 2.0 (the "License");
6-
# * you may not use this file except in compliance with the License.
7-
# * You may obtain a copy of the License at
8-
# *
9-
# * https://www.apache.org/licenses/LICENSE-2.0
10-
# *
11-
# * Unless required by applicable law or agreed to in writing, software
12-
# * distributed under the License is distributed on an "AS IS" BASIS,
13-
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
# * See the License for the specific language governing permissions and
15-
# * limitations under the License.
16-
# */
17-
#
181
spring.main.banner-mode=off
192
logging.level.root=ERROR
203
logging.level.test.org.springdoc.api=ERROR

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

Lines changed: 78 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -904,55 +904,37 @@
904904
}
905905
}
906906
},
907-
"RepresentationModelObject": {
907+
"Links": {
908908
"type": "object",
909-
"properties": {
910-
"_links": {
911-
"$ref": "#/components/schemas/Links"
912-
}
909+
"additionalProperties": {
910+
"$ref": "#/components/schemas/Link"
913911
}
914912
},
915-
"CollectionModelCustomer": {
913+
"RepresentationModelObject": {
916914
"type": "object",
917915
"properties": {
918-
"_embedded": {
919-
"type": "object",
920-
"properties": {
921-
"customers": {
922-
"type": "array",
923-
"items": {
924-
"$ref": "#/components/schemas/Customer"
925-
}
926-
}
927-
}
928-
},
929916
"_links": {
930917
"$ref": "#/components/schemas/Links"
931918
}
932919
}
933920
},
934-
"Customer": {
921+
"Account": {
935922
"type": "object",
936923
"properties": {
937924
"id": {
938925
"type": "integer",
939926
"format": "int64"
940927
},
941-
"firstname": {
942-
"type": "string"
928+
"customer": {
929+
"$ref": "#/components/schemas/Customer"
943930
},
944-
"lastname": {
945-
"type": "string"
931+
"expiryDate": {
932+
"type": "string",
933+
"format": "date-time"
946934
}
947935
}
948936
},
949-
"Links": {
950-
"type": "object",
951-
"additionalProperties": {
952-
"$ref": "#/components/schemas/Link"
953-
}
954-
},
955-
"EntityModelCustomer": {
937+
"Customer": {
956938
"type": "object",
957939
"properties": {
958940
"id": {
@@ -964,89 +946,84 @@
964946
},
965947
"lastname": {
966948
"type": "string"
949+
}
950+
}
951+
},
952+
"CollectionModelAccount": {
953+
"type": "object",
954+
"properties": {
955+
"_embedded": {
956+
"type": "object",
957+
"properties": {
958+
"accounts": {
959+
"type": "array",
960+
"items": {
961+
"$ref": "#/components/schemas/Account"
962+
}
963+
}
964+
}
967965
},
968966
"_links": {
969967
"$ref": "#/components/schemas/Links"
970968
}
971969
}
972970
},
973-
"RepresentationModelCustomer": {
971+
"RepresentationModelAccount": {
974972
"type": "object",
975973
"properties": {
976974
"_links": {
977975
"$ref": "#/components/schemas/Links"
978976
}
979977
}
980978
},
981-
"PageMetadataCustomer": {
979+
"EntityModelAccount": {
982980
"type": "object",
983981
"properties": {
984-
"size": {
982+
"id": {
985983
"type": "integer",
986984
"format": "int64"
987985
},
988-
"totalElements": {
989-
"type": "integer",
990-
"format": "int64"
986+
"customer": {
987+
"$ref": "#/components/schemas/Customer"
991988
},
992-
"totalPages": {
993-
"type": "integer",
994-
"format": "int64"
989+
"expiryDate": {
990+
"type": "string",
991+
"format": "date-time"
995992
},
996-
"number": {
997-
"type": "integer",
998-
"format": "int64"
993+
"_links": {
994+
"$ref": "#/components/schemas/Links"
999995
}
1000996
}
1001997
},
1002-
"PagedModelCustomer": {
998+
"CollectionModelObject": {
1003999
"type": "object",
10041000
"properties": {
10051001
"_embedded": {
10061002
"type": "object",
10071003
"properties": {
1008-
"customers": {
1004+
"objects": {
10091005
"type": "array",
10101006
"items": {
1011-
"$ref": "#/components/schemas/Customer"
1007+
"type": "object"
10121008
}
10131009
}
10141010
}
10151011
},
10161012
"_links": {
10171013
"$ref": "#/components/schemas/Links"
1018-
},
1019-
"page": {
1020-
"$ref": "#/components/schemas/PageMetadataCustomer"
1021-
}
1022-
}
1023-
},
1024-
"Account": {
1025-
"type": "object",
1026-
"properties": {
1027-
"id": {
1028-
"type": "integer",
1029-
"format": "int64"
1030-
},
1031-
"customer": {
1032-
"$ref": "#/components/schemas/Customer"
1033-
},
1034-
"expiryDate": {
1035-
"type": "string",
1036-
"format": "date-time"
10371014
}
10381015
}
10391016
},
1040-
"CollectionModelAccount": {
1017+
"CollectionModelCustomer": {
10411018
"type": "object",
10421019
"properties": {
10431020
"_embedded": {
10441021
"type": "object",
10451022
"properties": {
1046-
"accounts": {
1023+
"customers": {
10471024
"type": "array",
10481025
"items": {
1049-
"$ref": "#/components/schemas/Account"
1026+
"$ref": "#/components/schemas/Customer"
10501027
}
10511028
}
10521029
}
@@ -1056,49 +1033,72 @@
10561033
}
10571034
}
10581035
},
1059-
"EntityModelAccount": {
1036+
"RepresentationModelCustomer": {
1037+
"type": "object",
1038+
"properties": {
1039+
"_links": {
1040+
"$ref": "#/components/schemas/Links"
1041+
}
1042+
}
1043+
},
1044+
"EntityModelCustomer": {
10601045
"type": "object",
10611046
"properties": {
10621047
"id": {
10631048
"type": "integer",
10641049
"format": "int64"
10651050
},
1066-
"customer": {
1067-
"$ref": "#/components/schemas/Customer"
1051+
"firstname": {
1052+
"type": "string"
10681053
},
1069-
"expiryDate": {
1070-
"type": "string",
1071-
"format": "date-time"
1054+
"lastname": {
1055+
"type": "string"
10721056
},
10731057
"_links": {
10741058
"$ref": "#/components/schemas/Links"
10751059
}
10761060
}
10771061
},
1078-
"RepresentationModelAccount": {
1062+
"PageMetadata": {
10791063
"type": "object",
10801064
"properties": {
1081-
"_links": {
1082-
"$ref": "#/components/schemas/Links"
1065+
"size": {
1066+
"type": "integer",
1067+
"format": "int64"
1068+
},
1069+
"totalElements": {
1070+
"type": "integer",
1071+
"format": "int64"
1072+
},
1073+
"totalPages": {
1074+
"type": "integer",
1075+
"format": "int64"
1076+
},
1077+
"number": {
1078+
"type": "integer",
1079+
"format": "int64"
10831080
}
10841081
}
10851082
},
1086-
"CollectionModelObject": {
1083+
"PagedModelCustomer": {
10871084
"type": "object",
10881085
"properties": {
10891086
"_embedded": {
10901087
"type": "object",
10911088
"properties": {
1092-
"objects": {
1089+
"customers": {
10931090
"type": "array",
10941091
"items": {
1095-
"type": "object"
1092+
"$ref": "#/components/schemas/Customer"
10961093
}
10971094
}
10981095
}
10991096
},
11001097
"_links": {
11011098
"$ref": "#/components/schemas/Links"
1099+
},
1100+
"page": {
1101+
"$ref": "#/components/schemas/PageMetadata"
11021102
}
11031103
}
11041104
},

0 commit comments

Comments
 (0)