forked from loafle/openapi-generator-original
[PYTHON] Setting default value for Required variables (#10809)
* [req_vars_changes] * Added new schema to generate samples to test the issue mentioned in the PR. * Changed the variable name from setRequiredVars to initRequiredVars * Added initRequiredVars as a generator additional property * Regenerating the samples after rebasing the code with master branch * Changed the description of additional property
This commit is contained in:
39
samples/client/petstore/python/test/test_triangle.py
Normal file
39
samples/client/petstore/python/test/test_triangle.py
Normal file
@@ -0,0 +1,39 @@
|
||||
"""
|
||||
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
|
||||
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
Generated by: https://openapi-generator.tech
|
||||
"""
|
||||
|
||||
|
||||
import sys
|
||||
import unittest
|
||||
|
||||
import petstore_api
|
||||
from petstore_api.model.polygon import Polygon
|
||||
from petstore_api.model.triangle_all_of import TriangleAllOf
|
||||
globals()['Polygon'] = Polygon
|
||||
globals()['TriangleAllOf'] = TriangleAllOf
|
||||
from petstore_api.model.triangle import Triangle
|
||||
|
||||
|
||||
class TestTriangle(unittest.TestCase):
|
||||
"""Triangle unit test stubs"""
|
||||
|
||||
def setUp(self):
|
||||
pass
|
||||
|
||||
def tearDown(self):
|
||||
pass
|
||||
|
||||
def testTriangle(self):
|
||||
"""Test Triangle"""
|
||||
# FIXME: construct object with mandatory attributes with example values
|
||||
# model = Triangle() # noqa: E501
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user