diff --git a/.github/workflows/samples-python-petstore.yaml b/.github/workflows/samples-python-petstore.yaml index 2b4b1c91e3c..bb659c8b8e6 100644 --- a/.github/workflows/samples-python-petstore.yaml +++ b/.github/workflows/samples-python-petstore.yaml @@ -8,6 +8,18 @@ on: - .github/workflows/samples-python-petstore.yaml jobs: + validate-pyproject-toml: + name: Validate pyproject.toml + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.13" + - name: Install validator + run: pip install 'validate-pyproject[all]' + - name: Validate + run: validate-pyproject samples/openapi3/client/petstore/python/pyproject.toml build: name: Test Python client runs-on: ubuntu-latest diff --git a/modules/openapi-generator/src/main/resources/python/pyproject.mustache b/modules/openapi-generator/src/main/resources/python/pyproject.mustache index 4b2949c9e9d..b97a1a5a77c 100644 --- a/modules/openapi-generator/src/main/resources/python/pyproject.mustache +++ b/modules/openapi-generator/src/main/resources/python/pyproject.mustache @@ -43,7 +43,7 @@ pydantic = ">= 2" typing-extensions = ">= 4.7.1" {{/poetry1}} {{^poetry1}} -requires-python = "^3.9" +requires-python = ">=3.9" dependencies = [ "urllib3 (>=2.1.0,<3.0.0)", diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/pyproject.toml b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/pyproject.toml index 602a4bba01a..db1f365aa46 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/pyproject.toml +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/pyproject.toml @@ -8,7 +8,7 @@ authors = [ license = "Apache 2.0" readme = "README.md" keywords = ["OpenAPI", "OpenAPI-Generator", "Echo Server API"] -requires-python = "^3.9" +requires-python = ">=3.9" dependencies = [ "urllib3 (>=2.1.0,<3.0.0)", diff --git a/samples/client/echo_api/python/pyproject.toml b/samples/client/echo_api/python/pyproject.toml index 602a4bba01a..db1f365aa46 100644 --- a/samples/client/echo_api/python/pyproject.toml +++ b/samples/client/echo_api/python/pyproject.toml @@ -8,7 +8,7 @@ authors = [ license = "Apache 2.0" readme = "README.md" keywords = ["OpenAPI", "OpenAPI-Generator", "Echo Server API"] -requires-python = "^3.9" +requires-python = ">=3.9" dependencies = [ "urllib3 (>=2.1.0,<3.0.0)", diff --git a/samples/openapi3/client/petstore/python/pyproject.toml b/samples/openapi3/client/petstore/python/pyproject.toml index fbf945b895c..b790b56f03d 100644 --- a/samples/openapi3/client/petstore/python/pyproject.toml +++ b/samples/openapi3/client/petstore/python/pyproject.toml @@ -8,7 +8,7 @@ authors = [ license = "Apache-2.0" readme = "README.md" keywords = ["OpenAPI", "OpenAPI-Generator", "OpenAPI Petstore"] -requires-python = "^3.9" +requires-python = ">=3.9" dependencies = [ "urllib3 (>=2.1.0,<3.0.0)",