forked from loafle/openapi-generator-original
Fix 18271: Circular imports on AllOf generation with REFACTOR_ALLOF_WITH_PROPERTIES_ONLY=True (#18272)
* fix issue 18271 * the same update for python-pydantic-v1 * add test * update samples * update samples * put properties under allOf for python client tests * update samples * add a test in test model
This commit is contained in:
committed by
GitHub
parent
2c663561ef
commit
453facc81c
@@ -0,0 +1,28 @@
|
||||
# AllOfSuperModel
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **str** | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.all_of_super_model import AllOfSuperModel
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of AllOfSuperModel from a JSON string
|
||||
all_of_super_model_instance = AllOfSuperModel.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print AllOfSuperModel.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
all_of_super_model_dict = all_of_super_model_instance.to_dict()
|
||||
# create an instance of AllOfSuperModel from a dict
|
||||
all_of_super_model_form_dict = all_of_super_model.from_dict(all_of_super_model_dict)
|
||||
```
|
||||
[[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,29 @@
|
||||
# CircularAllOfRef
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **str** | | [optional]
|
||||
**second_circular_all_of_ref** | [**List[SecondCircularAllOfRef]**](SecondCircularAllOfRef.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.circular_all_of_ref import CircularAllOfRef
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of CircularAllOfRef from a JSON string
|
||||
circular_all_of_ref_instance = CircularAllOfRef.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print CircularAllOfRef.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
circular_all_of_ref_dict = circular_all_of_ref_instance.to_dict()
|
||||
# create an instance of CircularAllOfRef from a dict
|
||||
circular_all_of_ref_form_dict = circular_all_of_ref.from_dict(circular_all_of_ref_dict)
|
||||
```
|
||||
[[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,29 @@
|
||||
# SecondCircularAllOfRef
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **str** | | [optional]
|
||||
**circular_all_of_ref** | [**List[CircularAllOfRef]**](CircularAllOfRef.md) | | [optional]
|
||||
|
||||
## Example
|
||||
|
||||
```python
|
||||
from petstore_api.models.second_circular_all_of_ref import SecondCircularAllOfRef
|
||||
|
||||
# TODO update the JSON string below
|
||||
json = "{}"
|
||||
# create an instance of SecondCircularAllOfRef from a JSON string
|
||||
second_circular_all_of_ref_instance = SecondCircularAllOfRef.from_json(json)
|
||||
# print the JSON string representation of the object
|
||||
print SecondCircularAllOfRef.to_json()
|
||||
|
||||
# convert the object into a dict
|
||||
second_circular_all_of_ref_dict = second_circular_all_of_ref_instance.to_dict()
|
||||
# create an instance of SecondCircularAllOfRef from a dict
|
||||
second_circular_all_of_ref_form_dict = second_circular_all_of_ref.from_dict(second_circular_all_of_ref_dict)
|
||||
```
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user