forked from loafle/openapi-generator-original
Support models with multi-level hierarchy (via roxspring) (#4503)
* Example of broken multi-level hierarchy * Support for multiple levels of hierarchy in model objects * Support for multiple levels of hierarchy in generators * Regenerated samples * Temporarily skip scalaz sample verification, which is having issue with Java version in CI container * Re-enable scalaz in verify samples Co-authored-by: Rob Oxspring <roxspring@imapmail.org>
This commit is contained in:
committed by
William Cheng
parent
daec02b8c5
commit
376e419d0b
@@ -86,6 +86,8 @@ Class | Method | HTTP request | Description
|
||||
- [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
|
||||
- [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
|
||||
- [ArrayTest](docs/ArrayTest.md)
|
||||
- [BigCat](docs/BigCat.md)
|
||||
- [BigCatAllOf](docs/BigCatAllOf.md)
|
||||
- [Capitalization](docs/Capitalization.md)
|
||||
- [Cat](docs/Cat.md)
|
||||
- [CatAllOf](docs/CatAllOf.md)
|
||||
|
||||
@@ -1422,6 +1422,10 @@ components:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Animal'
|
||||
- $ref: '#/components/schemas/Cat_allOf'
|
||||
BigCat:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Cat'
|
||||
- $ref: '#/components/schemas/BigCat_allOf'
|
||||
Animal:
|
||||
discriminator:
|
||||
propertyName: className
|
||||
@@ -2086,6 +2090,15 @@ components:
|
||||
properties:
|
||||
declawed:
|
||||
type: boolean
|
||||
BigCat_allOf:
|
||||
properties:
|
||||
kind:
|
||||
enum:
|
||||
- lions
|
||||
- tigers
|
||||
- leopards
|
||||
- jaguars
|
||||
type: string
|
||||
securitySchemes:
|
||||
petstore_auth:
|
||||
flows:
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
# BigCat
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**ClassName** | **string** | |
|
||||
**Color** | **string** | | [optional] [default to red]
|
||||
**Declawed** | **bool** | | [optional]
|
||||
**Kind** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# BigCatAllOf
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Kind** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* API version: 1.0.0
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package petstore
|
||||
// BigCat struct for BigCat
|
||||
type BigCat struct {
|
||||
ClassName string `json:"className" xml:"className"`
|
||||
Color string `json:"color,omitempty" xml:"color"`
|
||||
Declawed bool `json:"declawed,omitempty" xml:"declawed"`
|
||||
Kind string `json:"kind,omitempty" xml:"kind"`
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* API version: 1.0.0
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package petstore
|
||||
// BigCatAllOf struct for BigCatAllOf
|
||||
type BigCatAllOf struct {
|
||||
Kind string `json:"kind,omitempty" xml:"kind"`
|
||||
}
|
||||
@@ -86,6 +86,8 @@ Class | Method | HTTP request | Description
|
||||
- [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
|
||||
- [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
|
||||
- [ArrayTest](docs/ArrayTest.md)
|
||||
- [BigCat](docs/BigCat.md)
|
||||
- [BigCatAllOf](docs/BigCatAllOf.md)
|
||||
- [Capitalization](docs/Capitalization.md)
|
||||
- [Cat](docs/Cat.md)
|
||||
- [CatAllOf](docs/CatAllOf.md)
|
||||
|
||||
@@ -1422,6 +1422,10 @@ components:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Animal'
|
||||
- $ref: '#/components/schemas/Cat_allOf'
|
||||
BigCat:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Cat'
|
||||
- $ref: '#/components/schemas/BigCat_allOf'
|
||||
Animal:
|
||||
discriminator:
|
||||
propertyName: className
|
||||
@@ -2086,6 +2090,15 @@ components:
|
||||
properties:
|
||||
declawed:
|
||||
type: boolean
|
||||
BigCat_allOf:
|
||||
properties:
|
||||
kind:
|
||||
enum:
|
||||
- lions
|
||||
- tigers
|
||||
- leopards
|
||||
- jaguars
|
||||
type: string
|
||||
securitySchemes:
|
||||
petstore_auth:
|
||||
flows:
|
||||
|
||||
14
samples/client/petstore/go/go-petstore/docs/BigCat.md
Normal file
14
samples/client/petstore/go/go-petstore/docs/BigCat.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# BigCat
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**ClassName** | **string** | |
|
||||
**Color** | **string** | | [optional] [default to red]
|
||||
**Declawed** | **bool** | | [optional]
|
||||
**Kind** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
11
samples/client/petstore/go/go-petstore/docs/BigCatAllOf.md
Normal file
11
samples/client/petstore/go/go-petstore/docs/BigCatAllOf.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# BigCatAllOf
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Kind** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
17
samples/client/petstore/go/go-petstore/model_big_cat.go
Normal file
17
samples/client/petstore/go/go-petstore/model_big_cat.go
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* API version: 1.0.0
|
||||
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
||||
*/
|
||||
|
||||
package petstore
|
||||
// BigCat struct for BigCat
|
||||
type BigCat struct {
|
||||
ClassName string `json:"className"`
|
||||
Color string `json:"color,omitempty"`
|
||||
Declawed bool `json:"declawed,omitempty"`
|
||||
Kind string `json:"kind,omitempty"`
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* API version: 1.0.0
|
||||
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
||||
*/
|
||||
|
||||
package petstore
|
||||
// BigCatAllOf struct for BigCatAllOf
|
||||
type BigCatAllOf struct {
|
||||
Kind string `json:"kind,omitempty"`
|
||||
}
|
||||
Reference in New Issue
Block a user