From ea600989f7317efec0a12bffd562569f7e566aa8 Mon Sep 17 00:00:00 2001 From: Sai Giridhar P Date: Sun, 3 Nov 2019 12:28:39 +0530 Subject: [PATCH] [python][metadata]: Adding license and author fields (#4318) * fix(license): Fixing the license and author information * fix(license): Fixing the license and author information * fix(metadata): Adding default values for contact details and license fields * fix(metadata): Adding default values for contact details and license fields --- .../resources/python/python-experimental/setup.mustache | 6 ++++-- .../src/main/resources/python/setup.mustache | 6 ++++-- samples/client/petstore/python-asyncio/setup.py | 4 +++- samples/client/petstore/python-experimental/setup.py | 4 +++- samples/client/petstore/python-tornado/setup.py | 4 +++- samples/client/petstore/python/setup.py | 4 +++- samples/openapi3/client/petstore/python/setup.py | 4 +++- 7 files changed, 23 insertions(+), 9 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python/python-experimental/setup.mustache b/modules/openapi-generator/src/main/resources/python/python-experimental/setup.mustache index 80006ded160..bf9ffe07d08 100644 --- a/modules/openapi-generator/src/main/resources/python/python-experimental/setup.mustache +++ b/modules/openapi-generator/src/main/resources/python/python-experimental/setup.mustache @@ -29,14 +29,16 @@ setup( name=NAME, version=VERSION, description="{{appName}}", - author_email="{{infoEmail}}", + author="{{#infoName}}{{infoName}}{{/infoName}}{{^infoName}}OpenAPI Generator community{{/infoName}}", + author_email="{{#infoEmail}}{{infoEmail}}{{/infoEmail}}{{^infoEmail}}team@openapitools.org{{/infoEmail}}", url="{{packageUrl}}", keywords=["OpenAPI", "OpenAPI-Generator", "{{{appName}}}"], install_requires=REQUIRES, extras_require=EXTRAS, packages=find_packages(exclude=["test", "tests"]), include_package_data=True, - long_description="""\ + {{#licenseInfo}}license="{{licenseInfo}}", + {{/licenseInfo}}long_description="""\ {{appDescription}} # noqa: E501 """ ) diff --git a/modules/openapi-generator/src/main/resources/python/setup.mustache b/modules/openapi-generator/src/main/resources/python/setup.mustache index 588851cc7b0..a41fee14674 100644 --- a/modules/openapi-generator/src/main/resources/python/setup.mustache +++ b/modules/openapi-generator/src/main/resources/python/setup.mustache @@ -28,13 +28,15 @@ setup( name=NAME, version=VERSION, description="{{appName}}", - author_email="{{infoEmail}}", + author="{{#infoName}}{{infoName}}{{/infoName}}{{^infoName}}OpenAPI Generator community{{/infoName}}", + author_email="{{#infoEmail}}{{infoEmail}}{{/infoEmail}}{{^infoEmail}}team@openapitools.org{{/infoEmail}}", url="{{packageUrl}}", keywords=["OpenAPI", "OpenAPI-Generator", "{{{appName}}}"], install_requires=REQUIRES, packages=find_packages(exclude=["test", "tests"]), include_package_data=True, - long_description="""\ + {{#licenseInfo}}license="{{licenseInfo}}", + {{/licenseInfo}}long_description="""\ {{appDescription}} # noqa: E501 """ ) diff --git a/samples/client/petstore/python-asyncio/setup.py b/samples/client/petstore/python-asyncio/setup.py index bf6cb115fc6..beeac0aae7f 100644 --- a/samples/client/petstore/python-asyncio/setup.py +++ b/samples/client/petstore/python-asyncio/setup.py @@ -28,12 +28,14 @@ setup( name=NAME, version=VERSION, description="OpenAPI Petstore", - author_email="", + author="OpenAPI Generator community", + author_email="team@openapitools.org", url="", keywords=["OpenAPI", "OpenAPI-Generator", "OpenAPI Petstore"], install_requires=REQUIRES, packages=find_packages(exclude=["test", "tests"]), include_package_data=True, + license="Apache-2.0", long_description="""\ 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 """ diff --git a/samples/client/petstore/python-experimental/setup.py b/samples/client/petstore/python-experimental/setup.py index bb88f06e4e4..f99ea80ad63 100644 --- a/samples/client/petstore/python-experimental/setup.py +++ b/samples/client/petstore/python-experimental/setup.py @@ -28,13 +28,15 @@ setup( name=NAME, version=VERSION, description="OpenAPI Petstore", - author_email="", + author="OpenAPI Generator community", + author_email="team@openapitools.org", url="", keywords=["OpenAPI", "OpenAPI-Generator", "OpenAPI Petstore"], install_requires=REQUIRES, extras_require=EXTRAS, packages=find_packages(exclude=["test", "tests"]), include_package_data=True, + license="Apache-2.0", long_description="""\ 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 """ diff --git a/samples/client/petstore/python-tornado/setup.py b/samples/client/petstore/python-tornado/setup.py index 6ed0ebf5009..921be1b7eae 100644 --- a/samples/client/petstore/python-tornado/setup.py +++ b/samples/client/petstore/python-tornado/setup.py @@ -28,12 +28,14 @@ setup( name=NAME, version=VERSION, description="OpenAPI Petstore", - author_email="", + author="OpenAPI Generator community", + author_email="team@openapitools.org", url="", keywords=["OpenAPI", "OpenAPI-Generator", "OpenAPI Petstore"], install_requires=REQUIRES, packages=find_packages(exclude=["test", "tests"]), include_package_data=True, + license="Apache-2.0", long_description="""\ 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 """ diff --git a/samples/client/petstore/python/setup.py b/samples/client/petstore/python/setup.py index 1d5e7c2915e..2a3ca48e06b 100644 --- a/samples/client/petstore/python/setup.py +++ b/samples/client/petstore/python/setup.py @@ -27,12 +27,14 @@ setup( name=NAME, version=VERSION, description="OpenAPI Petstore", - author_email="", + author="OpenAPI Generator community", + author_email="team@openapitools.org", url="", keywords=["OpenAPI", "OpenAPI-Generator", "OpenAPI Petstore"], install_requires=REQUIRES, packages=find_packages(exclude=["test", "tests"]), include_package_data=True, + license="Apache-2.0", long_description="""\ 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 """ diff --git a/samples/openapi3/client/petstore/python/setup.py b/samples/openapi3/client/petstore/python/setup.py index 1d5e7c2915e..2a3ca48e06b 100644 --- a/samples/openapi3/client/petstore/python/setup.py +++ b/samples/openapi3/client/petstore/python/setup.py @@ -27,12 +27,14 @@ setup( name=NAME, version=VERSION, description="OpenAPI Petstore", - author_email="", + author="OpenAPI Generator community", + author_email="team@openapitools.org", url="", keywords=["OpenAPI", "OpenAPI-Generator", "OpenAPI Petstore"], install_requires=REQUIRES, packages=find_packages(exclude=["test", "tests"]), include_package_data=True, + license="Apache-2.0", long_description="""\ 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 """