mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-05 15:36:09 +00:00
[Inline model resolver] various improvements (#12293)
* better handling of requestbody in the inline resolver * remove commented code * better request body naming * fix unique naming * minor code format change * removed additional underscore from names, fix test * more fixes, update tests * fix all tests * undo changes to default codegen * update samples * update python tests * add new files * update samples
This commit is contained in:
@@ -788,7 +788,7 @@ 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)
|
||||
|
||||
# **post_inline_additional_properties_payload**
|
||||
> InlineObject6 post_inline_additional_properties_payload()
|
||||
> PostInlineAdditionalPropertiesPayloadRequest post_inline_additional_properties_payload()
|
||||
|
||||
|
||||
|
||||
@@ -799,7 +799,7 @@ No authorization required
|
||||
import time
|
||||
import petstore_api
|
||||
from petstore_api.api import fake_api
|
||||
from petstore_api.model.inline_object6 import InlineObject6
|
||||
from petstore_api.model.post_inline_additional_properties_payload_request import PostInlineAdditionalPropertiesPayloadRequest
|
||||
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.
|
||||
@@ -812,20 +812,20 @@ configuration = petstore_api.Configuration(
|
||||
with petstore_api.ApiClient() as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = fake_api.FakeApi(api_client)
|
||||
inline_object6 = InlineObject6(
|
||||
post_inline_additional_properties_payload_request = PostInlineAdditionalPropertiesPayloadRequest(
|
||||
array_data=[
|
||||
FakePostInlineAdditionalPropertiesPayloadArrayData(
|
||||
PostInlineAdditionalPropertiesPayloadRequestArrayDataInner(
|
||||
labels=[
|
||||
"labels_example",
|
||||
],
|
||||
),
|
||||
],
|
||||
) # InlineObject6 | (optional)
|
||||
) # PostInlineAdditionalPropertiesPayloadRequest | (optional)
|
||||
|
||||
# example passing only required values which don't have defaults set
|
||||
# and optional values
|
||||
try:
|
||||
api_response = api_instance.post_inline_additional_properties_payload(inline_object6=inline_object6)
|
||||
api_response = api_instance.post_inline_additional_properties_payload(post_inline_additional_properties_payload_request=post_inline_additional_properties_payload_request)
|
||||
pprint(api_response)
|
||||
except petstore_api.ApiException as e:
|
||||
print("Exception when calling FakeApi->post_inline_additional_properties_payload: %s\n" % e)
|
||||
@@ -836,11 +836,11 @@ with petstore_api.ApiClient() as api_client:
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**inline_object6** | [**InlineObject6**](InlineObject6.md)| | [optional]
|
||||
**post_inline_additional_properties_payload_request** | [**PostInlineAdditionalPropertiesPayloadRequest**](PostInlineAdditionalPropertiesPayloadRequest.md)| | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
[**InlineObject6**](InlineObject6.md)
|
||||
[**PostInlineAdditionalPropertiesPayloadRequest**](PostInlineAdditionalPropertiesPayloadRequest.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
@@ -887,7 +887,7 @@ with petstore_api.ApiClient() as api_client:
|
||||
api_instance = fake_api.FakeApi(api_client)
|
||||
inline_additional_properties_ref_payload = InlineAdditionalPropertiesRefPayload(
|
||||
array_data=[
|
||||
FakePostInlineAdditionalPropertiesPayloadArrayData(
|
||||
PostInlineAdditionalPropertiesPayloadRequestArrayDataInner(
|
||||
labels=[
|
||||
"labels_example",
|
||||
],
|
||||
|
||||
@@ -5,7 +5,7 @@ this payload is used for verification that some model_to_dict issues are fixed
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**array_data** | [**[FakePostInlineAdditionalPropertiesPayloadArrayData], none_type**](FakePostInlineAdditionalPropertiesPayloadArrayData.md) | | [optional]
|
||||
**array_data** | [**[PostInlineAdditionalPropertiesPayloadRequestArrayDataInner], none_type**](PostInlineAdditionalPropertiesPayloadRequestArrayDataInner.md) | | [optional]
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct 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,13 @@
|
||||
# PostInlineAdditionalPropertiesPayloadRequest
|
||||
|
||||
this payload is used for verification that some model_to_dict issues are fixed
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**array_data** | [**[PostInlineAdditionalPropertiesPayloadRequestArrayDataInner], none_type**](PostInlineAdditionalPropertiesPayloadRequestArrayDataInner.md) | | [optional]
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct 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 @@
|
||||
# PostInlineAdditionalPropertiesPayloadRequestArrayDataInner
|
||||
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**labels** | **[str, none_type]** | | [optional]
|
||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct 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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user