Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ff137 committed Sep 18, 2023
2 parents 1557e07 + bab67e4 commit 9597159
Show file tree
Hide file tree
Showing 17,888 changed files with 884,743 additions and 599,396 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
23 changes: 16 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,18 @@ commands: # a reusable command with parameters
- run:
command: 'sudo docker info >/dev/null 2>&1 || sudo service docker start; '
- run:
command: |-
printf '127.0.0.1 petstore.swagger.io
' | sudo tee -a /etc/hosts
command: |
sudo tee -a /etc/hosts \<<< "127.0.0.1 path.v1.test.openapi-generator.tech"
sudo tee -a /etc/hosts \<<< "127.0.0.1 path.v2.test.openapi-generator.tech"
sudo tee -a /etc/hosts \<<< "127.0.0.111 path.v3.test.openapi-generator.tech"
sudo tee -a /etc/hosts \<<< "127.0.0.1 operation.v1.test.openapi-generator.tech"
sudo tee -a /etc/hosts \<<< "127.0.0.1 operation.v2.test.openapi-generator.tech"
sudo tee -a /etc/hosts \<<< "127.0.0.111 operation.v3.test.openapi-generator.tech"
sudo tee -a /etc/hosts \<<< "127.0.0.1 server.v1.test.openapi-generator.tech"
sudo tee -a /etc/hosts \<<< "127.0.0.1 server.v2.test.openapi-generator.tech"
sudo tee -a /etc/hosts \<<< "127.0.0.111 server.v3.test.openapi-generator.tech"
sudo tee -a /etc/hosts \<<< "127.0.0.1 petstore.swagger.io"
cat /etc/hosts
# - run: docker pull openapitools/openapi-petstore
# - run: docker run -d -e OPENAPI_BASE_PATH=/v3 -e DISABLE_API_KEY=1 -e DISABLE_OAUTH=1 -p 80:8080 openapitools/openapi-petstore
- run: docker pull swaggerapi/petstore
Expand All @@ -49,7 +58,7 @@ commands: # a reusable command with parameters
- run: sleep 30
- run: cat /etc/hosts
# Test
- run: mvn --no-snapshot-updates --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- run: ./mvnw --no-snapshot-updates --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- run:
name: "Setup custom environment variables"
command: echo 'export CIRCLE_NODE_INDEX="<<parameters.nodeNo>>"' >> $BASH_ENV
Expand Down Expand Up @@ -195,8 +204,8 @@ jobs:
- command_build_and_test:
nodeNo: "3"
node4:
docker:
- image: fkrull/multi-python
machine:
image: ubuntu-2004:202201-02
working_directory: ~/OpenAPITools/openapi-generator
shell: /bin/bash --login
environment:
Expand All @@ -206,7 +215,7 @@ jobs:
DOCKER_CODEGEN_CLI_IMAGE_NAME: openapitools/openapi-generator-cli
steps:
- checkout
- command_docker_build_and_test:
- command_build_and_test:
nodeNo: "4"
workflows:
version: 2
Expand Down
6 changes: 0 additions & 6 deletions .github/.test/samples.json
Original file line number Diff line number Diff line change
Expand Up @@ -800,12 +800,6 @@
"Client: Python"
]
},
{
"input": "python-server-flask-petstore-python2.sh",
"matches": [
"Server: Python"
]
},
{
"input": "python-server-flask-petstore.sh",
"matches": [
Expand Down
9 changes: 2 additions & 7 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,13 @@
- [ ] Run the following to [build the project](https://github.com/OpenAPITools/openapi-generator#14---build-projects) and update samples:
```
./mvnw clean package
./bin/generate-samples.sh
./bin/generate-samples.sh ./bin/configs/*.yaml
./bin/utils/export_docs_generators.sh
```
Commit all changed files.
This is important, as CI jobs will verify _all_ generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example `./bin/generate-samples.sh bin/configs/java*`.
For Windows users, please run the script in [Git BASH](https://gitforwindows.org/).
- [ ] In case you are adding a new generator, run the following additional script :
```
./bin/utils/ensure-up-to-date
```
Commit all changed files.
- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master` (6.3.0) (minor release - breaking changes with fallbacks), `7.0.x` (breaking changes without fallbacks)
- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master` (upcoming 7.1.0 minor release - breaking changes with fallbacks), `8.0.x` (breaking changes without fallbacks)
- [ ] If your PR is targeting a particular programming language, @mention the [technical committee](https://github.com/openapitools/openapi-generator/#62---openapi-generator-technical-committee) members, so they are more likely to review the pull request.
4 changes: 2 additions & 2 deletions .github/actions/run-samples/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ inputs:
runs:
using: "composite"
steps:
- run: mvn --no-snapshot-updates --batch-mode --quiet ${{ inputs.goal }} -P${{ inputs.name }} -Dintegration-test -Dmaven.javadoc.skip=true ${{ inputs.args }}
shell: bash
- run: ./mvnw clean --no-snapshot-updates --batch-mode --quiet ${{ inputs.goal }} -P${{ inputs.name }} -Dintegration-test -Dmaven.javadoc.skip=true ${{ inputs.args }}
shell: bash
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@ updates:
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "maven"
directory: "/"
schedule:
interval: "weekly"
allow:
- dependency-name: "com.gradle.*"
39 changes: 39 additions & 0 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Docker tests

on:
push:
paths:
- Dockerfile
- run-in-docker.sh
- pom.xml
- modules/openapi-generator-online/pom.xml
- modules/openapi-generator-online/Dockerfile
pull_request:
paths:
- Dockerfile
- run-in-docker.sh
- pom.xml
- modules/openapi-generator-online/pom.xml
- modules/openapi-generator-online/Dockerfile
jobs:
build:
name: 'Build: Docker'
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Test run-in-docker.sh
shell: bash
run: |
sed -i 's/ -it / /g' run-in-docker.sh
./run-in-docker.sh mvn clean install
- name: Build Dockerfile
shell: bash
run: docker build .

- name: Build modules/openapi-generator-online
shell: bash
run: |
docker build modules/openapi-generator-online/ -t test
4 changes: 2 additions & 2 deletions .github/workflows/gradle-plugin-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
name: Gradle plugin tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
Expand All @@ -38,7 +38,7 @@ jobs:
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
run: |
mvn --no-snapshot-updates --batch-mode --quiet install -DskipTests -Dorg.slf4j.simpleLogger.defaultLogLevel=error
./mvnw clean --no-snapshot-updates --batch-mode --quiet install -DskipTests -Dorg.slf4j.simpleLogger.defaultLogLevel=error
(cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew buildGoSdk) # using gradle-6.8.3 via wrapper
(cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew openApiGenerate)
(cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew buildDotnetSdk)
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/gradle-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ jobs:
- samples/client/petstore/java/jersey2-java8
- samples/client/petstore/java/okhttp-gson
- samples/client/petstore/java/okhttp-gson-group-parameter
- samples/client/petstore/java/webclient-swagger2
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
os: [ubuntu-latest]
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
Expand All @@ -45,14 +45,14 @@ jobs:
${{ runner.os }}-gradle-
- name: Setup Maven
uses: s4u/setup-maven-action@v1.7.0
uses: s4u/setup-maven-action@v1.9.0
with:
java-version: ${{ matrix.java }}
maven-version: 3.9.0
maven-version: 3.8.8

- name: Build with Maven
shell: bash
run: mvn -nsu -B --quiet -Djacoco.skip=true -Dorg.slf4j.simpleLogger.defaultLogLevel=error --no-transfer-progress clean install --file pom.xml
run: ./mvnw clean -nsu -B --quiet -Dorg.slf4j.simpleLogger.defaultLogLevel=error --no-transfer-progress install --file pom.xml
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}

Expand All @@ -74,7 +74,7 @@ jobs:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
run: |
cd modules/openapi-generator-maven-plugin
mvn verify -Pintegration
mvn clean verify -Pintegration
verify:
name: Verify outputs on ${{ matrix.os }}
Expand All @@ -85,12 +85,12 @@ jobs:
os: [ubuntu-latest]
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Maven
uses: s4u/setup-maven-action@v1.7.0
uses: s4u/setup-maven-action@v1.9.0
with:
java-version: 11
maven-version: 3.9.0
maven-version: 3.8.8
- name: Download build artifact
uses: actions/download-artifact@v3
with:
Expand All @@ -101,7 +101,7 @@ jobs:
git config --global core.fileMode false
git config --global core.safecrlf false
git config --global core.autocrlf true
mvn clean package -Dmaven.test.skip=true -Dmaven.javadoc.skip=true
./mvnw clean package -Dmaven.test.skip=true -Dmaven.javadoc.skip=true
# test with java (jersey2) client generation only as ensure-up-to-date script is run in another job instead
./bin/generate-samples.sh ./bin/configs/java-jersey2-8.yaml
# test debugSupportingFiles
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/maven-plugin-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
name: Maven plugin tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
Expand All @@ -37,8 +37,8 @@ jobs:
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
run: |
mvn clean install -DskipTests -Dmaven.javadoc.skip=true
mvn --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/java-client.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
mvn --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/multi-module/pom.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
mvn --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/kotlin.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
mvn --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/spring.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
./mvnw clean install -DskipTests -Dmaven.javadoc.skip=true
./mvnw --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/java-client.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
./mvnw --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/multi-module/pom.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
./mvnw --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/kotlin.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
./mvnw --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/spring.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
2 changes: 1 addition & 1 deletion .github/workflows/misc-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
name: Misc tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '2.6'
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/openapi-generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
Expand All @@ -36,7 +36,7 @@ jobs:
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
- name: Run maven
run: mvn --no-snapshot-updates --batch-mode --quiet install -DskipTests -Dorg.slf4j.simpleLogger.defaultLogLevel=error
run: ./mvnw clean --no-snapshot-updates --batch-mode --quiet install -DskipTests -Dorg.slf4j.simpleLogger.defaultLogLevel=error
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
- run: ls -la modules/openapi-generator-cli/target
Expand All @@ -53,7 +53,7 @@ jobs:
needs:
- build
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
Expand All @@ -74,7 +74,7 @@ jobs:
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
- name: Run unit tests
run: mvn --no-snapshot-updates --batch-mode --quiet --fail-at-end test -Dorg.slf4j.simpleLogger.defaultLogLevel=error
run: ./mvnw clean --no-snapshot-updates --batch-mode --quiet --fail-at-end test -Dorg.slf4j.simpleLogger.defaultLogLevel=error
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
- name: Publish unit test reports
Expand All @@ -90,7 +90,7 @@ jobs:
needs:
- build
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
Expand Down Expand Up @@ -129,7 +129,7 @@ jobs:
- build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/samples-c-libcurl-client.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Samples c libcurl client

on:
push:
paths:
- 'samples/client/petstore/c/**'
pull_request:
paths:
- 'samples/client/petstore/c/**'

jobs:
build:
name: Build c libcurl client
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Prepare
run: |
sudo apt-get update
sudo apt-get install -y libssl-dev libcurl4-openssl-dev
- name: Build
working-directory: "samples/client/petstore/c"
run: |
mkdir build
cd build
cmake ..
make
2 changes: 1 addition & 1 deletion .github/workflows/samples-cpp-qt-client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
tools: 'tools_openssl_x64'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt-version }}
Expand Down
16 changes: 4 additions & 12 deletions .github/workflows/samples-dart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,19 @@ jobs:
name: Tests Dart
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 8
- name: Cache maven dependencies
uses: actions/cache@v3
env:
cache-name: maven-repository
with:
path: |
~/.m2/repository
~/.gradle
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
java-version: 11
cache: maven
- name: Cache test dependencies
uses: actions/cache@v3
env:
cache-name: pub-cache
with:
path: $PUB_CACHE
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('samples/**/pubspec.yaml') }}
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('samples/**/pubspec.*') }}
- uses: dart-lang/setup-dart@v1
with:
sdk: 2.15.0
Expand Down
Loading

0 comments on commit 9597159

Please sign in to comment.