-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Go generate all of with multiple ref and discriminator (#18390)
* feat(go): Generate compiling stubs for allOf with multiple refs and discriminator * feat(go): Generate compiling stubs for allOf with multiple refs and discriminator * feat(go): Generate compiling stubs for allOf with multiple refs and discriminator
- Loading branch information
Showing
3 changed files
with
79 additions
and
6 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
54 changes: 54 additions & 0 deletions
54
...les/openapi-generator/src/test/resources/3_0/go/allof_multiple_ref_and_discriminator.yaml
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,54 @@ | ||
openapi: 3.0.0 | ||
info: | ||
title: Test | ||
version: 1.0.0 | ||
paths: {} | ||
components: | ||
schemas: | ||
FinalItem: | ||
type: object | ||
allOf: | ||
- $ref: '#/components/schemas/BaseItem' | ||
- $ref: '#/components/schemas/AdditionalData' | ||
BaseItem: | ||
type: object | ||
properties: | ||
title: | ||
type: string | ||
type: | ||
type: string | ||
enum: | ||
- FINAL | ||
example: FINAL | ||
discriminator: | ||
propertyName: type | ||
mapping: | ||
FINAL: '#/components/schemas/FinalItem' | ||
required: | ||
- title | ||
- type | ||
AdditionalData: | ||
type: object | ||
properties: | ||
prop1: | ||
type: string | ||
quantity: | ||
type: integer | ||
format: int32 | ||
example: 1 | ||
minimum: 1 | ||
unitPrice: | ||
type: number | ||
format: double | ||
example: 9.99 | ||
minimum: 0.0 | ||
totalPrice: | ||
type: number | ||
format: double | ||
example: 9.99 | ||
minimum: 0.0 | ||
required: | ||
- prop1 | ||
- quantity | ||
- unitPrice | ||
- totalPrice |