forked from loafle/openapi-generator-original
Adds spec additionalProperties + nullable examples (#2405)
* Adds v2 spec additionalproperties examples, adds v3 spec nulllable model example, updates samples * Remaining samples updates * Adds csharp generator update to handle models with multilevel parent types, which works for the AdditionalPropertiesObject model, samples updated
This commit is contained in:
committed by
William Cheng
parent
c10463600a
commit
b67318ef21
@@ -0,0 +1,39 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
OpenAPI Petstore
|
||||
|
||||
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
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Generated by: https://openapi-generator.tech
|
||||
"""
|
||||
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import unittest
|
||||
|
||||
import petstore_api
|
||||
from petstore_api.models.additional_properties_any_type import AdditionalPropertiesAnyType # noqa: E501
|
||||
from petstore_api.rest import ApiException
|
||||
|
||||
|
||||
class TestAdditionalPropertiesAnyType(unittest.TestCase):
|
||||
"""AdditionalPropertiesAnyType unit test stubs"""
|
||||
|
||||
def setUp(self):
|
||||
pass
|
||||
|
||||
def tearDown(self):
|
||||
pass
|
||||
|
||||
def testAdditionalPropertiesAnyType(self):
|
||||
"""Test AdditionalPropertiesAnyType"""
|
||||
# FIXME: construct object with mandatory attributes with example values
|
||||
# model = petstore_api.models.additional_properties_any_type.AdditionalPropertiesAnyType() # noqa: E501
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
@@ -0,0 +1,39 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
OpenAPI Petstore
|
||||
|
||||
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
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Generated by: https://openapi-generator.tech
|
||||
"""
|
||||
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import unittest
|
||||
|
||||
import petstore_api
|
||||
from petstore_api.models.additional_properties_array import AdditionalPropertiesArray # noqa: E501
|
||||
from petstore_api.rest import ApiException
|
||||
|
||||
|
||||
class TestAdditionalPropertiesArray(unittest.TestCase):
|
||||
"""AdditionalPropertiesArray unit test stubs"""
|
||||
|
||||
def setUp(self):
|
||||
pass
|
||||
|
||||
def tearDown(self):
|
||||
pass
|
||||
|
||||
def testAdditionalPropertiesArray(self):
|
||||
"""Test AdditionalPropertiesArray"""
|
||||
# FIXME: construct object with mandatory attributes with example values
|
||||
# model = petstore_api.models.additional_properties_array.AdditionalPropertiesArray() # noqa: E501
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
@@ -0,0 +1,39 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
OpenAPI Petstore
|
||||
|
||||
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
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Generated by: https://openapi-generator.tech
|
||||
"""
|
||||
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import unittest
|
||||
|
||||
import petstore_api
|
||||
from petstore_api.models.additional_properties_boolean import AdditionalPropertiesBoolean # noqa: E501
|
||||
from petstore_api.rest import ApiException
|
||||
|
||||
|
||||
class TestAdditionalPropertiesBoolean(unittest.TestCase):
|
||||
"""AdditionalPropertiesBoolean unit test stubs"""
|
||||
|
||||
def setUp(self):
|
||||
pass
|
||||
|
||||
def tearDown(self):
|
||||
pass
|
||||
|
||||
def testAdditionalPropertiesBoolean(self):
|
||||
"""Test AdditionalPropertiesBoolean"""
|
||||
# FIXME: construct object with mandatory attributes with example values
|
||||
# model = petstore_api.models.additional_properties_boolean.AdditionalPropertiesBoolean() # noqa: E501
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
@@ -0,0 +1,39 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
OpenAPI Petstore
|
||||
|
||||
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
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Generated by: https://openapi-generator.tech
|
||||
"""
|
||||
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import unittest
|
||||
|
||||
import petstore_api
|
||||
from petstore_api.models.additional_properties_integer import AdditionalPropertiesInteger # noqa: E501
|
||||
from petstore_api.rest import ApiException
|
||||
|
||||
|
||||
class TestAdditionalPropertiesInteger(unittest.TestCase):
|
||||
"""AdditionalPropertiesInteger unit test stubs"""
|
||||
|
||||
def setUp(self):
|
||||
pass
|
||||
|
||||
def tearDown(self):
|
||||
pass
|
||||
|
||||
def testAdditionalPropertiesInteger(self):
|
||||
"""Test AdditionalPropertiesInteger"""
|
||||
# FIXME: construct object with mandatory attributes with example values
|
||||
# model = petstore_api.models.additional_properties_integer.AdditionalPropertiesInteger() # noqa: E501
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
@@ -0,0 +1,39 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
OpenAPI Petstore
|
||||
|
||||
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
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Generated by: https://openapi-generator.tech
|
||||
"""
|
||||
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import unittest
|
||||
|
||||
import petstore_api
|
||||
from petstore_api.models.additional_properties_number import AdditionalPropertiesNumber # noqa: E501
|
||||
from petstore_api.rest import ApiException
|
||||
|
||||
|
||||
class TestAdditionalPropertiesNumber(unittest.TestCase):
|
||||
"""AdditionalPropertiesNumber unit test stubs"""
|
||||
|
||||
def setUp(self):
|
||||
pass
|
||||
|
||||
def tearDown(self):
|
||||
pass
|
||||
|
||||
def testAdditionalPropertiesNumber(self):
|
||||
"""Test AdditionalPropertiesNumber"""
|
||||
# FIXME: construct object with mandatory attributes with example values
|
||||
# model = petstore_api.models.additional_properties_number.AdditionalPropertiesNumber() # noqa: E501
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
@@ -0,0 +1,39 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
OpenAPI Petstore
|
||||
|
||||
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
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Generated by: https://openapi-generator.tech
|
||||
"""
|
||||
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import unittest
|
||||
|
||||
import petstore_api
|
||||
from petstore_api.models.additional_properties_object import AdditionalPropertiesObject # noqa: E501
|
||||
from petstore_api.rest import ApiException
|
||||
|
||||
|
||||
class TestAdditionalPropertiesObject(unittest.TestCase):
|
||||
"""AdditionalPropertiesObject unit test stubs"""
|
||||
|
||||
def setUp(self):
|
||||
pass
|
||||
|
||||
def tearDown(self):
|
||||
pass
|
||||
|
||||
def testAdditionalPropertiesObject(self):
|
||||
"""Test AdditionalPropertiesObject"""
|
||||
# FIXME: construct object with mandatory attributes with example values
|
||||
# model = petstore_api.models.additional_properties_object.AdditionalPropertiesObject() # noqa: E501
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
@@ -0,0 +1,39 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
OpenAPI Petstore
|
||||
|
||||
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
|
||||
|
||||
OpenAPI spec version: 1.0.0
|
||||
Generated by: https://openapi-generator.tech
|
||||
"""
|
||||
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import unittest
|
||||
|
||||
import petstore_api
|
||||
from petstore_api.models.additional_properties_string import AdditionalPropertiesString # noqa: E501
|
||||
from petstore_api.rest import ApiException
|
||||
|
||||
|
||||
class TestAdditionalPropertiesString(unittest.TestCase):
|
||||
"""AdditionalPropertiesString unit test stubs"""
|
||||
|
||||
def setUp(self):
|
||||
pass
|
||||
|
||||
def tearDown(self):
|
||||
pass
|
||||
|
||||
def testAdditionalPropertiesString(self):
|
||||
"""Test AdditionalPropertiesString"""
|
||||
# FIXME: construct object with mandatory attributes with example values
|
||||
# model = petstore_api.models.additional_properties_string.AdditionalPropertiesString() # noqa: E501
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user