diff --git a/modules/openapi-generator/src/main/resources/python-flask/util.mustache b/modules/openapi-generator/src/main/resources/python-flask/util.mustache index 30ba3247eee..f2b90009a46 100644 --- a/modules/openapi-generator/src/main/resources/python-flask/util.mustache +++ b/modules/openapi-generator/src/main/resources/python-flask/util.mustache @@ -16,7 +16,7 @@ def _deserialize(data, klass): if data is None: return None - if klass in six.integer_types or klass in (float, str, bool): + if klass in six.integer_types or klass in (float, str, bool, bytearray): return _deserialize_primitive(data, klass) elif klass == object: return _deserialize_object(data) diff --git a/samples/openapi3/server/petstore/python-flask/openapi_server/controllers/pet_controller.py b/samples/openapi3/server/petstore/python-flask/openapi_server/controllers/pet_controller.py index 253f3bbfa1c..125820f0054 100644 --- a/samples/openapi3/server/petstore/python-flask/openapi_server/controllers/pet_controller.py +++ b/samples/openapi3/server/petstore/python-flask/openapi_server/controllers/pet_controller.py @@ -49,15 +49,13 @@ def find_pets_by_status(status): # noqa: E501 return 'do some magic!' -def find_pets_by_tags(tags, max_count=None): # noqa: E501 +def find_pets_by_tags(tags): # noqa: E501 """Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. # noqa: E501 :param tags: Tags to filter by :type tags: List[str] - :param max_count: Maximum number of items to return - :type max_count: int :rtype: List[Pet] """ diff --git a/samples/openapi3/server/petstore/python-flask/openapi_server/openapi/openapi.yaml b/samples/openapi3/server/petstore/python-flask/openapi_server/openapi/openapi.yaml index 851fb5fb816..42547ecf8ac 100644 --- a/samples/openapi3/server/petstore/python-flask/openapi_server/openapi/openapi.yaml +++ b/samples/openapi3/server/petstore/python-flask/openapi_server/openapi/openapi.yaml @@ -115,15 +115,6 @@ paths: type: string type: array style: form - - description: Maximum number of items to return - explode: true - in: query - name: maxCount - required: false - schema: - format: int32 - type: integer - style: form responses: 200: content: diff --git a/samples/openapi3/server/petstore/python-flask/openapi_server/test/test_pet_controller.py b/samples/openapi3/server/petstore/python-flask/openapi_server/test/test_pet_controller.py index fc95fab555f..c756d7bb2ca 100644 --- a/samples/openapi3/server/petstore/python-flask/openapi_server/test/test_pet_controller.py +++ b/samples/openapi3/server/petstore/python-flask/openapi_server/test/test_pet_controller.py @@ -89,8 +89,7 @@ class TestPetController(BaseTestCase): Finds Pets by tags """ - query_string = [('tags', 'tags_example'), - ('maxCount', 56)] + query_string = [('tags', 'tags_example')] headers = { 'Accept': 'application/json', 'Authorization': 'Bearer special-key', diff --git a/samples/openapi3/server/petstore/python-flask/openapi_server/util.py b/samples/openapi3/server/petstore/python-flask/openapi_server/util.py index 4b0188652ba..e1185a713ec 100644 --- a/samples/openapi3/server/petstore/python-flask/openapi_server/util.py +++ b/samples/openapi3/server/petstore/python-flask/openapi_server/util.py @@ -16,7 +16,7 @@ def _deserialize(data, klass): if data is None: return None - if klass in six.integer_types or klass in (float, str, bool): + if klass in six.integer_types or klass in (float, str, bool, bytearray): return _deserialize_primitive(data, klass) elif klass == object: return _deserialize_object(data) diff --git a/samples/server/petstore/python-flask/openapi_server/util.py b/samples/server/petstore/python-flask/openapi_server/util.py index 4b0188652ba..e1185a713ec 100644 --- a/samples/server/petstore/python-flask/openapi_server/util.py +++ b/samples/server/petstore/python-flask/openapi_server/util.py @@ -16,7 +16,7 @@ def _deserialize(data, klass): if data is None: return None - if klass in six.integer_types or klass in (float, str, bool): + if klass in six.integer_types or klass in (float, str, bool, bytearray): return _deserialize_primitive(data, klass) elif klass == object: return _deserialize_object(data)