-
-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This introduces an enhancement to better handle the oneOf schema in OpenAPI definitions. - Added a new OpenAPI test fixture - oneOfMerge.yaml - Updated logic in the codegen script where oneOf schemas are encountered. The properties of the schema are now deeply merged to accommodate different variations. - Added a new test case to confirm the improved handling of oneOf schemas. more details: #503 (comment) fix: #495 -- Signed-off-by: kahiro okina <kahiro.okina@craftsman-software.com>
- Loading branch information
1 parent
ee62a62
commit d97fc2e
Showing
3 changed files
with
51 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
openapi: 3.0.3 | ||
info: | ||
title: OneOfMerge | ||
version: 0.1.0 | ||
paths: | ||
/mix: | ||
get: | ||
description: stats | ||
parameters: | ||
- name: param1 | ||
in: query | ||
schema: | ||
oneOf: | ||
- required: | ||
- c | ||
properties: | ||
a: | ||
type: string | ||
- required: | ||
- b | ||
properties: | ||
b: | ||
type: string | ||
required: | ||
- d | ||
properties: | ||
c: | ||
type: string | ||
d: | ||
enum: | ||
- enum1 | ||
- enum2 | ||
type: string | ||
responses: | ||
"200": | ||
description: ok |
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