Skip to content

Commit fbe64fb

Browse files
committed
working test case
1 parent 0e789aa commit fbe64fb

File tree

2 files changed

+12
-27
lines changed
  • springdoc-openapi-tests/springdoc-openapi-kotlin-webmvc-tests/src/test

2 files changed

+12
-27
lines changed

Diff for: springdoc-openapi-tests/springdoc-openapi-kotlin-webmvc-tests/src/test/kotlin/test/org/springdoc/api/app13/TestController.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ data class KeyValue(
3434

3535
@Schema
3636
data class SomeDTO(
37-
@Schema(description = "Description A", allOf = [KeyValue::class]) val fieldA: KeyValue,
38-
@Schema(description = "Description B", allOf = [KeyValue::class]) val fieldB: KeyValue,
37+
@Schema(description = "Description A") val fieldA: KeyValue,
38+
@Schema(description = "Description B") val fieldB: KeyValue,
3939
)
4040

4141

Diff for: springdoc-openapi-tests/springdoc-openapi-kotlin-webmvc-tests/src/test/resources/results/app13.json

+10-25
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"openapi" : "3.0.1",
2+
"openapi" : "3.1.0",
33
"info" : {
44
"title" : "OpenAPI definition",
55
"version" : "v0"
@@ -37,19 +37,14 @@
3737
"required" : [ "key", "value" ],
3838
"type" : "object",
3939
"description" : "Generic description",
40-
"allOf" : [ {
41-
"$ref" : "#/components/schemas/KeyValue"
42-
}, {
43-
"type" : "object",
44-
"properties" : {
45-
"key" : {
46-
"type" : "string"
47-
},
48-
"value" : {
49-
"type" : "string"
50-
}
40+
"properties" : {
41+
"key" : {
42+
"type" : "string"
43+
},
44+
"value" : {
45+
"type" : "string"
5146
}
52-
} ]
47+
}
5348
},
5449
"SomeDTO" : {
5550
"required": [
@@ -59,22 +54,12 @@
5954
"type": "object",
6055
"properties": {
6156
"fieldA": {
62-
"type": "object",
6357
"description": "Description A",
64-
"allOf": [
65-
{
66-
"$ref": "#/components/schemas/KeyValue"
67-
}
68-
]
58+
"$ref": "#/components/schemas/KeyValue"
6959
},
7060
"fieldB": {
71-
"type": "object",
7261
"description": "Description B",
73-
"allOf": [
74-
{
75-
"$ref": "#/components/schemas/KeyValue"
76-
}
77-
]
62+
"$ref": "#/components/schemas/KeyValue"
7863
}
7964
}
8065
}

0 commit comments

Comments
 (0)