mirror of
https://github.com/jlengrand/openapi-generator.git
synced 2026-05-08 15:53:54 +00:00
Fixes serialization of array items in model_to_dict [python] (#9153)
* Adds tests of endpoint with inline and refed model * Regen samples * Samples regenerated
This commit is contained in:
@@ -12,6 +12,8 @@ Method | HTTP request | Description
|
||||
[**download_attachment**](FakeApi.md#download_attachment) | **GET** /{fileName} | downloads a file using Content-Disposition
|
||||
[**enum_test**](FakeApi.md#enum_test) | **POST** /fake/refs/enum-test | Object contains enum properties and array properties containing enums
|
||||
[**fake_health_get**](FakeApi.md#fake_health_get) | **GET** /fake/health | Health check endpoint
|
||||
[**get_inline_additional_properties_payload**](FakeApi.md#get_inline_additional_properties_payload) | **GET** /fake/getInlineAdditionalPropertiesPayload |
|
||||
[**get_inline_additional_properties_ref_payload**](FakeApi.md#get_inline_additional_properties_ref_payload) | **GET** /fake/getInlineAdditionalPropertiesRefPayload |
|
||||
[**mammal**](FakeApi.md#mammal) | **POST** /fake/refs/mammal |
|
||||
[**number_with_validations**](FakeApi.md#number_with_validations) | **POST** /fake/refs/number |
|
||||
[**object_model_with_ref_props**](FakeApi.md#object_model_with_ref_props) | **POST** /fake/refs/object_model_with_ref_props |
|
||||
@@ -562,6 +564,148 @@ No authorization required
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **get_inline_additional_properties_payload**
|
||||
> InlineObject6 get_inline_additional_properties_payload()
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```python
|
||||
import time
|
||||
import petstore_api
|
||||
from petstore_api.api import fake_api
|
||||
from petstore_api.model.inline_object6 import InlineObject6
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with petstore_api.ApiClient() as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = fake_api.FakeApi(api_client)
|
||||
inline_object6 = InlineObject6(
|
||||
array_data=[
|
||||
FakeGetInlineAdditionalPropertiesPayloadArrayData(
|
||||
labels=[
|
||||
"labels_example",
|
||||
],
|
||||
),
|
||||
],
|
||||
) # InlineObject6 | (optional)
|
||||
|
||||
# example passing only required values which don't have defaults set
|
||||
# and optional values
|
||||
try:
|
||||
api_response = api_instance.get_inline_additional_properties_payload(inline_object6=inline_object6)
|
||||
pprint(api_response)
|
||||
except petstore_api.ApiException as e:
|
||||
print("Exception when calling FakeApi->get_inline_additional_properties_payload: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**inline_object6** | [**InlineObject6**](InlineObject6.md)| | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**InlineObject6**](InlineObject6.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | InlineAdditionalPropertiesPayload | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **get_inline_additional_properties_ref_payload**
|
||||
> InlineAdditionalPropertiesRefPayload get_inline_additional_properties_ref_payload()
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```python
|
||||
import time
|
||||
import petstore_api
|
||||
from petstore_api.api import fake_api
|
||||
from petstore_api.model.inline_additional_properties_ref_payload import InlineAdditionalPropertiesRefPayload
|
||||
from pprint import pprint
|
||||
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||
# See configuration.py for a list of all supported configuration parameters.
|
||||
configuration = petstore_api.Configuration(
|
||||
host = "http://petstore.swagger.io:80/v2"
|
||||
)
|
||||
|
||||
|
||||
# Enter a context with an instance of the API client
|
||||
with petstore_api.ApiClient() as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = fake_api.FakeApi(api_client)
|
||||
inline_additional_properties_ref_payload = InlineAdditionalPropertiesRefPayload(
|
||||
array_data=[
|
||||
FakeGetInlineAdditionalPropertiesPayloadArrayData(
|
||||
labels=[
|
||||
"labels_example",
|
||||
],
|
||||
),
|
||||
],
|
||||
) # InlineAdditionalPropertiesRefPayload | (optional)
|
||||
|
||||
# example passing only required values which don't have defaults set
|
||||
# and optional values
|
||||
try:
|
||||
api_response = api_instance.get_inline_additional_properties_ref_payload(inline_additional_properties_ref_payload=inline_additional_properties_ref_payload)
|
||||
pprint(api_response)
|
||||
except petstore_api.ApiException as e:
|
||||
print("Exception when calling FakeApi->get_inline_additional_properties_ref_payload: %s\n" % e)
|
||||
```
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**inline_additional_properties_ref_payload** | [**InlineAdditionalPropertiesRefPayload**](InlineAdditionalPropertiesRefPayload.md)| | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**InlineAdditionalPropertiesRefPayload**](InlineAdditionalPropertiesRefPayload.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | InlineAdditionalPropertiesRefPayload | - |
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
||||
# **mammal**
|
||||
> Mammal mammal(mammal)
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# FakeGetInlineAdditionalPropertiesPayloadArrayData
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**labels** | **[str, none_type]** | | [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,12 @@
|
||||
# InlineAdditionalPropertiesRefPayload
|
||||
|
||||
this payload is used for verification that some model_to_dict issues are fixed
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**array_data** | [**[FakeGetInlineAdditionalPropertiesPayloadArrayData], none_type**](FakeGetInlineAdditionalPropertiesPayloadArrayData.md) | | [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,12 @@
|
||||
# InlineObject6
|
||||
|
||||
this payload is used for verification that some model_to_dict issues are fixed
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**array_data** | [**[FakeGetInlineAdditionalPropertiesPayloadArrayData], none_type**](FakeGetInlineAdditionalPropertiesPayloadArrayData.md) | | [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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user