[python-pydantic-v1] various improvements (#16658)

* rename, add tests

* remove library support in python pydantic v1 codegen

* copy tests

* copy echo api tests

* update samples

* update doc

* add back library support
This commit is contained in:
William Cheng
2023-09-25 15:59:06 +08:00
committed by GitHub
parent 3b95f701e5
commit 077744a7af
231 changed files with 8281 additions and 2684 deletions

View File

@@ -3,20 +3,22 @@
"""
Echo Server API
Echo Server API
Echo Server API # noqa: E501
The version of the OpenAPI document: 0.1.0
Contact: team@openapitools.org
Generated by OpenAPI Generator (https://openapi-generator.tech)
Generated by: https://openapi-generator.tech
"""
Do not edit the class manually.
""" # noqa: E501
from __future__ import absolute_import
import unittest
import datetime
import openapi_client
from openapi_client.models.query import Query # noqa: E501
from openapi_client.rest import ApiException
class TestQuery(unittest.TestCase):
"""Query unit test stubs"""
@@ -27,22 +29,22 @@ class TestQuery(unittest.TestCase):
def tearDown(self):
pass
def make_instance(self, include_optional) -> Query:
def make_instance(self, include_optional):
"""Test Query
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included """
# uncomment below to create an instance of `Query`
"""
model = Query() # noqa: E501
if include_optional:
model = openapi_client.models.query.Query() # noqa: E501
if include_optional :
return Query(
id = 56,
id = 56,
outcomes = [
'SUCCESS'
]
)
else:
else :
return Query(
)
"""