mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-06 16:36:12 +00:00
sync master, update doc
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
# ClassModel
|
||||
|
||||
Model for testing model with \"_class\" property
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# File
|
||||
|
||||
Must be named `File` for test.
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# HealthCheckResult
|
||||
|
||||
Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model.
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# Model200Response
|
||||
|
||||
Model for testing model name starting with number
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# ModelReturn
|
||||
|
||||
Model for testing reserved words
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# Name
|
||||
|
||||
Model for testing model name same as property name
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
import datetime
|
||||
from dateutil.parser import parse
|
||||
import json
|
||||
import mimetypes
|
||||
from multiprocessing.pool import ThreadPool
|
||||
@@ -287,7 +288,7 @@ class ApiClient(object):
|
||||
elif klass == datetime.date:
|
||||
return self.__deserialize_date(data)
|
||||
elif klass == datetime.datetime:
|
||||
return self.__deserialize_datatime(data)
|
||||
return self.__deserialize_datetime(data)
|
||||
else:
|
||||
return self.__deserialize_model(data, klass)
|
||||
|
||||
@@ -340,18 +341,19 @@ class ApiClient(object):
|
||||
response_type, auth_settings,
|
||||
_return_http_data_only, collection_formats,
|
||||
_preload_content, _request_timeout, _host)
|
||||
else:
|
||||
thread = self.pool.apply_async(self.__call_api, (resource_path,
|
||||
method, path_params, query_params,
|
||||
header_params, body,
|
||||
post_params, files,
|
||||
response_type, auth_settings,
|
||||
_return_http_data_only,
|
||||
collection_formats,
|
||||
_preload_content,
|
||||
_request_timeout,
|
||||
_host))
|
||||
return thread
|
||||
|
||||
return self.pool.apply_async(self.__call_api, (resource_path,
|
||||
method, path_params,
|
||||
query_params,
|
||||
header_params, body,
|
||||
post_params, files,
|
||||
response_type,
|
||||
auth_settings,
|
||||
_return_http_data_only,
|
||||
collection_formats,
|
||||
_preload_content,
|
||||
_request_timeout,
|
||||
_host))
|
||||
|
||||
def request(self, method, url, query_params=None, headers=None,
|
||||
post_params=None, body=None, _preload_content=True,
|
||||
@@ -577,7 +579,6 @@ class ApiClient(object):
|
||||
:return: date.
|
||||
"""
|
||||
try:
|
||||
from dateutil.parser import parse
|
||||
return parse(string).date()
|
||||
except ImportError:
|
||||
return string
|
||||
@@ -587,7 +588,7 @@ class ApiClient(object):
|
||||
reason="Failed to parse `{0}` as date object".format(string)
|
||||
)
|
||||
|
||||
def __deserialize_datatime(self, string):
|
||||
def __deserialize_datetime(self, string):
|
||||
"""Deserializes string to datetime.
|
||||
|
||||
The string should be in iso8601 datetime format.
|
||||
@@ -596,7 +597,6 @@ class ApiClient(object):
|
||||
:return: datetime.
|
||||
"""
|
||||
try:
|
||||
from dateutil.parser import parse
|
||||
return parse(string)
|
||||
except ImportError:
|
||||
return string
|
||||
|
||||
@@ -32,6 +32,8 @@ class EnumClass(object):
|
||||
_EFG = "-efg"
|
||||
_XYZ_ = "(xyz)"
|
||||
|
||||
allowable_values = [_ABC, _EFG, _XYZ_] # noqa: E501
|
||||
|
||||
"""
|
||||
Attributes:
|
||||
openapi_types (dict): The key is attribute name
|
||||
|
||||
@@ -32,6 +32,8 @@ class OuterEnum(object):
|
||||
APPROVED = "approved"
|
||||
DELIVERED = "delivered"
|
||||
|
||||
allowable_values = [PLACED, APPROVED, DELIVERED] # noqa: E501
|
||||
|
||||
"""
|
||||
Attributes:
|
||||
openapi_types (dict): The key is attribute name
|
||||
|
||||
@@ -32,6 +32,8 @@ class OuterEnumDefaultValue(object):
|
||||
APPROVED = "approved"
|
||||
DELIVERED = "delivered"
|
||||
|
||||
allowable_values = [PLACED, APPROVED, DELIVERED] # noqa: E501
|
||||
|
||||
"""
|
||||
Attributes:
|
||||
openapi_types (dict): The key is attribute name
|
||||
|
||||
@@ -32,6 +32,8 @@ class OuterEnumInteger(object):
|
||||
_1 = "1"
|
||||
_2 = "2"
|
||||
|
||||
allowable_values = [_0, _1, _2] # noqa: E501
|
||||
|
||||
"""
|
||||
Attributes:
|
||||
openapi_types (dict): The key is attribute name
|
||||
|
||||
@@ -32,6 +32,8 @@ class OuterEnumIntegerDefaultValue(object):
|
||||
_1 = "1"
|
||||
_2 = "2"
|
||||
|
||||
allowable_values = [_0, _1, _2] # noqa: E501
|
||||
|
||||
"""
|
||||
Attributes:
|
||||
openapi_types (dict): The key is attribute name
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
certifi >= 14.05.14
|
||||
future; python_version<="2.7"
|
||||
six >= 1.10
|
||||
python_dateutil >= 2.5.3
|
||||
setuptools >= 21.0.0
|
||||
|
||||
@@ -27,12 +27,14 @@ setup(
|
||||
name=NAME,
|
||||
version=VERSION,
|
||||
description="OpenAPI Petstore",
|
||||
author_email="",
|
||||
author="OpenAPI Generator community",
|
||||
author_email="team@openapitools.org",
|
||||
url="",
|
||||
keywords=["OpenAPI", "OpenAPI-Generator", "OpenAPI Petstore"],
|
||||
install_requires=REQUIRES,
|
||||
packages=find_packages(exclude=["test", "tests"]),
|
||||
include_package_data=True,
|
||||
license="Apache-2.0",
|
||||
long_description="""\
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user