fix #11958 [BUG] python generates wrong model name and model file name (#11959)

* fix #11958 [BUG] python generates wrong model name and model file name

Modify AbstractPythonCodegen.toModelName just like AbstractJavaCodegen.toModelName

* add unit test

* update samples and docs
by
./bin/generate-samples.sh
./bin/utils/export_docs_generators.sh

* fix AbstractPythonCodegen#toModelName logic, remove underscore

* update samples and docs
by
./bin/generate-samples.sh
./bin/utils/export_docs_generators.sh
This commit is contained in:
Daniel Qian
2022-04-02 10:43:08 +08:00
committed by GitHub
parent 5d5e753e66
commit 41451ff5ee
34 changed files with 2123 additions and 17 deletions

View File

@@ -0,0 +1,35 @@
"""
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.model_200_response import Model_200Response
class TestModel_200Response(unittest.TestCase):
"""Model_200Response unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def testModel_200Response(self):
"""Test Model_200Response"""
# FIXME: construct object with mandatory attributes with example values
# model = Model_200Response() # noqa: E501
pass
if __name__ == '__main__':
unittest.main()