Skip to content

Commit

Permalink
working test case
Browse files Browse the repository at this point in the history
  • Loading branch information
martinitus authored and MRuecklCC committed Jan 2, 2025
1 parent a9148f4 commit c4d2078
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ data class KeyValue(

@Schema
data class SomeDTO(
@Schema(description = "Description A", allOf = [KeyValue::class]) val fieldA: KeyValue,
@Schema(description = "Description B", allOf = [KeyValue::class]) val fieldB: KeyValue,
@Schema(description = "Description A") val fieldA: KeyValue,
@Schema(description = "Description B") val fieldB: KeyValue,
)


Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"openapi" : "3.0.1",
"openapi" : "3.1.0",
"info" : {
"title" : "OpenAPI definition",
"version" : "v0"
Expand Down Expand Up @@ -37,19 +37,14 @@
"required" : [ "key", "value" ],
"type" : "object",
"description" : "Generic description",
"allOf" : [ {
"$ref" : "#/components/schemas/KeyValue"
}, {
"type" : "object",
"properties" : {
"key" : {
"type" : "string"
},
"value" : {
"type" : "string"
}
"properties" : {
"key" : {
"type" : "string"
},
"value" : {
"type" : "string"
}
} ]
}
},
"SomeDTO" : {
"required": [
Expand All @@ -59,22 +54,12 @@
"type": "object",
"properties": {
"fieldA": {
"type": "object",
"description": "Description A",
"allOf": [
{
"$ref": "#/components/schemas/KeyValue"
}
]
"$ref": "#/components/schemas/KeyValue"
},
"fieldB": {
"type": "object",
"description": "Description B",
"allOf": [
{
"$ref": "#/components/schemas/KeyValue"
}
]
"$ref": "#/components/schemas/KeyValue"
}
}
}
Expand Down

0 comments on commit c4d2078

Please sign in to comment.