diff --git a/modules/openapi-generator/src/main/resources/python-flask/setup.mustache b/modules/openapi-generator/src/main/resources/python-flask/setup.mustache index ef4c3bd3c0ac..bda71175d0da 100644 --- a/modules/openapi-generator/src/main/resources/python-flask/setup.mustache +++ b/modules/openapi-generator/src/main/resources/python-flask/setup.mustache @@ -14,10 +14,10 @@ VERSION = "{{packageVersion}}" # http://pypi.python.org/pypi/setuptools REQUIRES = [ - "connexion==2.0.0", - "swagger-ui-bundle==0.0.2", - "python_dateutil==2.6.0"{{#supportPython2}}, - "typing==3.5.2.2"{{/supportPython2}} + "connexion>=2.0.2", + "swagger-ui-bundle>=0.0.2", + "python_dateutil>=2.6.0"{{#supportPython2}}, + "typing>=3.5.2.2"{{/supportPython2}} ] setup( diff --git a/samples/openapi3/server/petstore/python-flask-python2/.openapi-generator/VERSION b/samples/openapi3/server/petstore/python-flask-python2/.openapi-generator/VERSION index 83a328a9227e..c3a2c7076fa8 100644 --- a/samples/openapi3/server/petstore/python-flask-python2/.openapi-generator/VERSION +++ b/samples/openapi3/server/petstore/python-flask-python2/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.0-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/server/petstore/python-flask-python2/git_push.sh b/samples/openapi3/server/petstore/python-flask-python2/git_push.sh index 20057f67ade4..ced3be2b0c7b 100644 --- a/samples/openapi3/server/petstore/python-flask-python2/git_push.sh +++ b/samples/openapi3/server/petstore/python-flask-python2/git_push.sh @@ -1,11 +1,17 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" @@ -37,9 +43,9 @@ if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git fi fi @@ -47,6 +53,6 @@ fi git pull origin master # Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" git push origin master 2>&1 | grep -v 'To https' diff --git a/samples/openapi3/server/petstore/python-flask-python2/openapi_server/controllers/pet_controller.py b/samples/openapi3/server/petstore/python-flask-python2/openapi_server/controllers/pet_controller.py index 253f3bbfa1c8..125820f00549 100644 --- a/samples/openapi3/server/petstore/python-flask-python2/openapi_server/controllers/pet_controller.py +++ b/samples/openapi3/server/petstore/python-flask-python2/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-python2/openapi_server/openapi/openapi.yaml b/samples/openapi3/server/petstore/python-flask-python2/openapi_server/openapi/openapi.yaml index 851fb5fb8167..42547ecf8ac9 100644 --- a/samples/openapi3/server/petstore/python-flask-python2/openapi_server/openapi/openapi.yaml +++ b/samples/openapi3/server/petstore/python-flask-python2/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-python2/openapi_server/test/test_pet_controller.py b/samples/openapi3/server/petstore/python-flask-python2/openapi_server/test/test_pet_controller.py index 7f8dfc547f18..230ac4a4b607 100644 --- a/samples/openapi3/server/petstore/python-flask-python2/openapi_server/test/test_pet_controller.py +++ b/samples/openapi3/server/petstore/python-flask-python2/openapi_server/test/test_pet_controller.py @@ -89,8 +89,7 @@ def test_find_pets_by_tags(self): 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-python2/openapi_server/util.py b/samples/openapi3/server/petstore/python-flask-python2/openapi_server/util.py index 4b0188652ba7..e1185a713ec9 100644 --- a/samples/openapi3/server/petstore/python-flask-python2/openapi_server/util.py +++ b/samples/openapi3/server/petstore/python-flask-python2/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/openapi3/server/petstore/python-flask-python2/setup.py b/samples/openapi3/server/petstore/python-flask-python2/setup.py index e18faf930bc5..322e14e654a7 100644 --- a/samples/openapi3/server/petstore/python-flask-python2/setup.py +++ b/samples/openapi3/server/petstore/python-flask-python2/setup.py @@ -14,10 +14,10 @@ # http://pypi.python.org/pypi/setuptools REQUIRES = [ - "connexion==2.0.0", - "swagger-ui-bundle==0.0.2", - "python_dateutil==2.6.0", - "typing==3.5.2.2" + "connexion>=2.0.2", + "swagger-ui-bundle>=0.0.2", + "python_dateutil>=2.6.0", + "typing>=3.5.2.2" ] setup( diff --git a/samples/openapi3/server/petstore/python-flask/.openapi-generator/VERSION b/samples/openapi3/server/petstore/python-flask/.openapi-generator/VERSION index 83a328a9227e..c3a2c7076fa8 100644 --- a/samples/openapi3/server/petstore/python-flask/.openapi-generator/VERSION +++ b/samples/openapi3/server/petstore/python-flask/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.0-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/server/petstore/python-flask/git_push.sh b/samples/openapi3/server/petstore/python-flask/git_push.sh index 20057f67ade4..ced3be2b0c7b 100644 --- a/samples/openapi3/server/petstore/python-flask/git_push.sh +++ b/samples/openapi3/server/petstore/python-flask/git_push.sh @@ -1,11 +1,17 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" @@ -37,9 +43,9 @@ if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git fi fi @@ -47,6 +53,6 @@ fi git pull origin master # Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" git push origin master 2>&1 | grep -v 'To https' diff --git a/samples/openapi3/server/petstore/python-flask/setup.py b/samples/openapi3/server/petstore/python-flask/setup.py index 9d7b02fbd90b..1cd2660efd67 100644 --- a/samples/openapi3/server/petstore/python-flask/setup.py +++ b/samples/openapi3/server/petstore/python-flask/setup.py @@ -14,9 +14,9 @@ # http://pypi.python.org/pypi/setuptools REQUIRES = [ - "connexion==2.0.0", - "swagger-ui-bundle==0.0.2", - "python_dateutil==2.6.0" + "connexion>=2.0.2", + "swagger-ui-bundle>=0.0.2", + "python_dateutil>=2.6.0" ] setup( diff --git a/samples/server/petstore/python-flask-python2/.openapi-generator/VERSION b/samples/server/petstore/python-flask-python2/.openapi-generator/VERSION index 83a328a9227e..c3a2c7076fa8 100644 --- a/samples/server/petstore/python-flask-python2/.openapi-generator/VERSION +++ b/samples/server/petstore/python-flask-python2/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.0-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/python-flask-python2/git_push.sh b/samples/server/petstore/python-flask-python2/git_push.sh index 20057f67ade4..ced3be2b0c7b 100644 --- a/samples/server/petstore/python-flask-python2/git_push.sh +++ b/samples/server/petstore/python-flask-python2/git_push.sh @@ -1,11 +1,17 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" @@ -37,9 +43,9 @@ if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git fi fi @@ -47,6 +53,6 @@ fi git pull origin master # Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" git push origin master 2>&1 | grep -v 'To https' diff --git a/samples/server/petstore/python-flask-python2/openapi_server/util.py b/samples/server/petstore/python-flask-python2/openapi_server/util.py index 4b0188652ba7..e1185a713ec9 100644 --- a/samples/server/petstore/python-flask-python2/openapi_server/util.py +++ b/samples/server/petstore/python-flask-python2/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-python2/setup.py b/samples/server/petstore/python-flask-python2/setup.py index e18faf930bc5..322e14e654a7 100644 --- a/samples/server/petstore/python-flask-python2/setup.py +++ b/samples/server/petstore/python-flask-python2/setup.py @@ -14,10 +14,10 @@ # http://pypi.python.org/pypi/setuptools REQUIRES = [ - "connexion==2.0.0", - "swagger-ui-bundle==0.0.2", - "python_dateutil==2.6.0", - "typing==3.5.2.2" + "connexion>=2.0.2", + "swagger-ui-bundle>=0.0.2", + "python_dateutil>=2.6.0", + "typing>=3.5.2.2" ] setup( diff --git a/samples/server/petstore/python-flask/.openapi-generator/VERSION b/samples/server/petstore/python-flask/.openapi-generator/VERSION index 83a328a9227e..c3a2c7076fa8 100644 --- a/samples/server/petstore/python-flask/.openapi-generator/VERSION +++ b/samples/server/petstore/python-flask/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.0-SNAPSHOT \ No newline at end of file +4.2.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/python-flask/git_push.sh b/samples/server/petstore/python-flask/git_push.sh index 20057f67ade4..ced3be2b0c7b 100644 --- a/samples/server/petstore/python-flask/git_push.sh +++ b/samples/server/petstore/python-flask/git_push.sh @@ -1,11 +1,17 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" @@ -37,9 +43,9 @@ if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git fi fi @@ -47,6 +53,6 @@ fi git pull origin master # Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" git push origin master 2>&1 | grep -v 'To https' diff --git a/samples/server/petstore/python-flask/setup.py b/samples/server/petstore/python-flask/setup.py index 9d7b02fbd90b..1cd2660efd67 100644 --- a/samples/server/petstore/python-flask/setup.py +++ b/samples/server/petstore/python-flask/setup.py @@ -14,9 +14,9 @@ # http://pypi.python.org/pypi/setuptools REQUIRES = [ - "connexion==2.0.0", - "swagger-ui-bundle==0.0.2", - "python_dateutil==2.6.0" + "connexion>=2.0.2", + "swagger-ui-bundle>=0.0.2", + "python_dateutil>=2.6.0" ] setup(