-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #1022 - Discriminator should only add Jackson JsonSubTypes when t…
…here's a parent class Signed-off-by: Ricardo Zanini <[email protected]>
- Loading branch information
1 parent
bb43278
commit 8fc8093
Showing
4 changed files
with
162 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
118 changes: 118 additions & 0 deletions
118
client/deployment/src/test/resources/openapi/issue-1022.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
{ | ||
"openapi": "3.0.3", | ||
"info": { | ||
"title": "tuto API", | ||
"version": "1.0.0-SNAPSHOT" | ||
}, | ||
"servers": [ | ||
{ | ||
"url": "http://localhost:8080", | ||
"description": "Auto generated value" | ||
}, | ||
{ | ||
"url": "http://0.0.0.0:8080", | ||
"description": "Auto generated value" | ||
} | ||
], | ||
"paths": { | ||
"/": { | ||
"get": { | ||
"tags": [ | ||
"Default" | ||
], | ||
"operationId": "get", | ||
"responses": { | ||
"200": { | ||
"description": "OK", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"$ref": "#/components/schemas/Data" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"components": { | ||
"schemas": { | ||
"Data": { | ||
"required": [ | ||
"things" | ||
], | ||
"type": "object", | ||
"properties": { | ||
"things": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/components/schemas/Thing" | ||
}, | ||
"anyOf": [ | ||
{ | ||
"$ref": "#/components/schemas/SomeThing" | ||
}, | ||
{ | ||
"$ref": "#/components/schemas/OtherThing" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"OtherThing": { | ||
"description": "Other thing", | ||
"required": [ | ||
"other" | ||
], | ||
"type": "object", | ||
"allOf": [ | ||
{ | ||
"$ref": "#/components/schemas/Thing" | ||
} | ||
], | ||
"properties": { | ||
"other": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"SomeThing": { | ||
"description": "Some thing", | ||
"required": [ | ||
"some" | ||
], | ||
"type": "object", | ||
"allOf": [ | ||
{ | ||
"$ref": "#/components/schemas/Thing" | ||
} | ||
], | ||
"properties": { | ||
"some": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"Thing": { | ||
"description": "Thing", | ||
"required": [ | ||
"thing" | ||
], | ||
"type": "object", | ||
"properties": { | ||
"thing": { | ||
"type": "string" | ||
} | ||
}, | ||
"discriminator": { | ||
"propertyName": "@type", | ||
"mapping": { | ||
"SomeThing": "#/components/schemas/SomeThing", | ||
"OtherThing": "#/components/schemas/OtherThing" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
...dules/ROOT/pages/includes/quarkus-openapi-generator-server_quarkus.openapi.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[.configuration-legend] | ||
icon:lock[title=Fixed at build time] Configuration property fixed at build time - All other configuration properties are overridable at runtime | ||
[.configuration-reference.searchable, cols="80,.^10,.^10"] | ||
|=== | ||
|
||
h|[.header-title]##Configuration property## | ||
h|Type | ||
h|Default | ||
|
||
3+|No configuration properties found. | ||
|
||
|=== | ||
|