Skip to content

Commit c2ccee6

Browse files
committed
[18929] added sample config and (re)generated samples
1 parent d01fb45 commit c2ccee6

83 files changed

Lines changed: 3548 additions & 1 deletion

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

modules/openapi-generator/src/test/resources/3_0/oneof_polymorphism_and_inheritance.yaml

Lines changed: 69 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,27 @@ paths:
4848
'application/json':
4949
schema:
5050
$ref: '#/components/schemas/Bar'
51+
/park-persons:
52+
post:
53+
tags:
54+
- PerkPerson
55+
summary: Create a Park Person
56+
operationId: createParkPerson
57+
requestBody:
58+
required: true
59+
content:
60+
'application/json':
61+
schema:
62+
oneOf:
63+
- $ref: '#/components/schemas/CreateParkAnimalCarerPerson'
64+
- $ref: '#/components/schemas/CreateParkVisitorPerson'
65+
responses:
66+
201:
67+
description: Park Person created
68+
content:
69+
'application/json':
70+
schema:
71+
type: string
5172

5273
components:
5374
schemas:
@@ -209,6 +230,53 @@ components:
209230
properties:
210231
length:
211232
type: integer
233+
AbstractAnimal:
234+
type: object
235+
discriminator:
236+
propertyName: type
237+
mapping:
238+
CAT: '#/components/schemas/Cat'
239+
NESTED_TWO: '#/components/schemas/Dog'
240+
required:
241+
- type
242+
properties:
243+
type:
244+
type: string
245+
Cat:
246+
type: object
247+
allOf:
248+
- $ref: '#/components/schemas/AbstractAnimal'
249+
AbstractCreateParkPerson:
250+
type: object
251+
discriminator:
252+
propertyName: type
253+
mapping:
254+
VISITOR: '#/components/schemas/CreateParkVisitorPerson'
255+
ANIMAL_CARER: '#/components/schemas/CreateParkAnimalCarerPerson'
256+
required:
257+
- type
258+
properties:
259+
type:
260+
type: string
261+
CreateParkAnimalCarerPerson:
262+
type: object
263+
allOf:
264+
- $ref: '#/components/schemas/AbstractCreateParkPerson'
265+
required:
266+
- responsibleFor
267+
properties:
268+
responsibleFor:
269+
oneOf:
270+
- $ref: '#/components/schemas/Dog'
271+
- $ref: '#/components/schemas/Cat'
272+
CreateParkVisitorPerson:
273+
type: object
274+
allOf:
275+
- $ref: '#/components/schemas/AbstractCreateParkPerson'
276+
Dog:
277+
type: object
278+
allOf:
279+
- $ref: '#/components/schemas/AbstractAnimal'
212280

213281
requestBodies:
214282
Foo:
@@ -235,4 +303,4 @@ components:
235303
schema:
236304
type: array
237305
items:
238-
$ref: '#/components/schemas/FooRefOrValue'
306+
$ref: '#/components/schemas/FooRefOrValue'

samples/client/others/rust/hyper/oneOf/.openapi-generator/FILES

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
.travis.yml
33
Cargo.toml
44
README.md
5+
docs/AbstractAnimal.md
6+
docs/AbstractCreateParkPerson.md
57
docs/Addressable.md
68
docs/Apple.md
79
docs/Banana.md
@@ -10,6 +12,11 @@ docs/BarApi.md
1012
docs/BarCreate.md
1113
docs/BarRef.md
1214
docs/BarRefOrValue.md
15+
docs/Cat.md
16+
docs/CreateParkAnimalCarerPerson.md
17+
docs/CreateParkPersonRequest.md
18+
docs/CreateParkVisitorPerson.md
19+
docs/Dog.md
1320
docs/Entity.md
1421
docs/EntityRef.md
1522
docs/Extensible.md
@@ -20,6 +27,7 @@ docs/FooRefOrValue.md
2027
docs/Fruit.md
2128
docs/FruitType.md
2229
docs/Pasta.md
30+
docs/PerkPersonApi.md
2331
docs/Pizza.md
2432
docs/PizzaSpeziale.md
2533
git_push.sh
@@ -28,15 +36,23 @@ src/apis/client.rs
2836
src/apis/configuration.rs
2937
src/apis/foo_api.rs
3038
src/apis/mod.rs
39+
src/apis/perk_person_api.rs
3140
src/apis/request.rs
3241
src/lib.rs
42+
src/models/abstract_animal.rs
43+
src/models/abstract_create_park_person.rs
3344
src/models/addressable.rs
3445
src/models/apple.rs
3546
src/models/banana.rs
3647
src/models/bar.rs
3748
src/models/bar_create.rs
3849
src/models/bar_ref.rs
3950
src/models/bar_ref_or_value.rs
51+
src/models/cat.rs
52+
src/models/create_park_animal_carer_person.rs
53+
src/models/create_park_person_request.rs
54+
src/models/create_park_visitor_person.rs
55+
src/models/dog.rs
4056
src/models/entity.rs
4157
src/models/entity_ref.rs
4258
src/models/extensible.rs

samples/client/others/rust/hyper/oneOf/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,25 @@ Class | Method | HTTP request | Description
3030
*BarApi* | [**create_bar**](docs/BarApi.md#create_bar) | **Post** /bar | Create a Bar
3131
*FooApi* | [**create_foo**](docs/FooApi.md#create_foo) | **Post** /foo | Create a Foo
3232
*FooApi* | [**get_all_foos**](docs/FooApi.md#get_all_foos) | **Get** /foo | GET all Foos
33+
*PerkPersonApi* | [**create_park_person**](docs/PerkPersonApi.md#create_park_person) | **Post** /park-persons | Create a Park Person
3334

3435

3536
## Documentation For Models
3637

38+
- [AbstractAnimal](docs/AbstractAnimal.md)
39+
- [AbstractCreateParkPerson](docs/AbstractCreateParkPerson.md)
3740
- [Addressable](docs/Addressable.md)
3841
- [Apple](docs/Apple.md)
3942
- [Banana](docs/Banana.md)
4043
- [Bar](docs/Bar.md)
4144
- [BarCreate](docs/BarCreate.md)
4245
- [BarRef](docs/BarRef.md)
4346
- [BarRefOrValue](docs/BarRefOrValue.md)
47+
- [Cat](docs/Cat.md)
48+
- [CreateParkAnimalCarerPerson](docs/CreateParkAnimalCarerPerson.md)
49+
- [CreateParkPersonRequest](docs/CreateParkPersonRequest.md)
50+
- [CreateParkVisitorPerson](docs/CreateParkVisitorPerson.md)
51+
- [Dog](docs/Dog.md)
4452
- [Entity](docs/Entity.md)
4553
- [EntityRef](docs/EntityRef.md)
4654
- [Extensible](docs/Extensible.md)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# AbstractAnimal
2+
3+
## Enum Variants
4+
5+
| Name | Value |
6+
|---- | -----|
7+
8+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
9+
10+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# AbstractCreateParkPerson
2+
3+
## Enum Variants
4+
5+
| Name | Value |
6+
|---- | -----|
7+
8+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
9+
10+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Cat
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**r#type** | **String** | |
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+
11+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# CreateParkAnimalCarerPerson
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**responsible_for** | Option<[**models::OneOfLessThanDogCommaCatGreaterThan**](oneOf<Dog,Cat>.md)> | |
8+
**r#type** | **String** | |
9+
10+
[[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+
12+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# CreateParkPersonRequest
2+
3+
## Enum Variants
4+
5+
| Name | Description |
6+
|---- | -----|
7+
| CreateParkAnimalCarerPerson | |
8+
| CreateParkVisitorPerson | |
9+
10+
[[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+
12+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# CreateParkVisitorPerson
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**r#type** | **String** | |
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+
11+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Dog
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**r#type** | **String** | |
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+
11+

0 commit comments

Comments
 (0)