Skip to content

Commit

Permalink
Merge branch 'master' of github.com:OpenAPITools/openapi-generator in…
Browse files Browse the repository at this point in the history
…to refactor-dart-dio
  • Loading branch information
ahmednfwela committed Aug 2, 2023
2 parents 49b4983 + 3278eea commit c9fb20e
Show file tree
Hide file tree
Showing 8,161 changed files with 360,153 additions and 284,255 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
17 changes: 13 additions & 4 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
2 changes: 1 addition & 1 deletion .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 clean --no-snapshot-updates --batch-mode --quiet ${{ inputs.goal }} -P${{ inputs.name }} -Dintegration-test -Dmaven.javadoc.skip=true ${{ inputs.args }}
- 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: 4 additions & 2 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ on:
- 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'
Expand All @@ -34,4 +35,5 @@ jobs:

- name: Build modules/openapi-generator-online
shell: bash
run: docker build modules/openapi-generator-online/
run: |
docker build modules/openapi-generator-online/ -t test
2 changes: 1 addition & 1 deletion .github/workflows/gradle-plugin-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
run: |
mvn clean --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
4 changes: 2 additions & 2 deletions .github/workflows/linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:

- name: Build with Maven
shell: bash
run: mvn clean -nsu -B --quiet -Dorg.slf4j.simpleLogger.defaultLogLevel=error --no-transfer-progress 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 Down Expand Up @@ -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
10 changes: 5 additions & 5 deletions .github/workflows/maven-plugin-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions .github/workflows/openapi-generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
- name: Run maven
run: mvn clean --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 Down Expand Up @@ -74,7 +74,7 @@ jobs:
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
- name: Run unit tests
run: mvn clean --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 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@v3
- 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
12 changes: 2 additions & 10 deletions .github/workflows/samples-dart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,14 @@ jobs:
with:
distribution: 'temurin'
java-version: 11
- 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') }}
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
6 changes: 3 additions & 3 deletions .github/workflows/samples-dotnet-standard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Samples C# .Net Standard
on:
push:
paths:
- 'samples/client/petstore/csharp-netcore/**netstandard**/'
- 'samples/client/petstore/csharp/**netstandard**/'
pull_request:
paths:
- 'samples/client/petstore/csharp-netcore/**netstandard**/'
- 'samples/client/petstore/csharp/**netstandard**/'
jobs:
build:
name: Build .Net projects
Expand All @@ -16,7 +16,7 @@ jobs:
matrix:
sample:
# clients
- samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0
- samples/client/petstore/csharp/OpenAPIClient-generichost-netstandard2.0
steps:
- uses: actions/checkout@v3
- uses: actions/[email protected]
Expand Down
22 changes: 12 additions & 10 deletions .github/workflows/samples-dotnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@ name: Samples C# .Net 7
on:
push:
paths:
- 'samples/client/petstore/csharp-netcore/**net6.0**/'
- 'samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore**/'
- 'samples/client/petstore/csharp/**net6.0**/'
- 'samples/client/petstore/csharp/OpenAPIClient-generichost-netcore**/'
- 'samples/client/petstore/csharp/OpenAPIClient-generichost-manual-tests/**'
- 'samples/server/petstore/aspnetcore-6.0/**'
- 'samples/server/petstore/aspnetcore-6.0-pocoModels/**'
- 'samples/server/petstore/aspnetcore-6.0-useSwashBuckle/**'
- 'samples/server/petstore/aspnetcore-6.0-useNewtonsoft/**'
pull_request:
paths:
- 'samples/client/petstore/csharp-netcore/**net6.0**/'
- 'samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore**/'
- 'samples/client/petstore/csharp/**net6.0**/'
- 'samples/client/petstore/csharp/OpenAPIClient-generichost-netcore**/'
- 'samples/client/petstore/csharp/OpenAPIClient-generichost-manual-tests/**'
- 'samples/server/petstore/aspnetcore-6.0/**'
- 'samples/server/petstore/aspnetcore-6.0-pocoModels/**'
- 'samples/server/petstore/aspnetcore-6.0-project4Models/**'
Expand All @@ -28,11 +29,12 @@ jobs:
matrix:
sample:
# clients
- samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0
- samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt
- samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf
- samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-oneOf
- samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-anyOf
- samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0
- samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt
- samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-allOf
- samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-oneOf
- samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-anyOf
- samples/client/petstore/csharp/OpenAPIClient-generichost-manual-tests
- samples/server/petstore/aspnetcore-6.0
- samples/server/petstore/aspnetcore-6.0-pocoModels
- samples/server/petstore/aspnetcore-6.0-project4Models
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/samples-dotnet6-client-echo-api.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Samples C# .Net 6

on:
push:
paths:
- samples/client/echo_api/csharp-restsharp/**
pull_request:
paths:
- samples/client/echo_api/csharp-restsharp/**
jobs:
build:
name: Build .Net clients
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# clients
- samples/client/echo_api/csharp-restsharp/
steps:
- uses: actions/checkout@v3
- uses: actions/[email protected]
with:
dotnet-version: '6.0.x'
- name: Run echo server
run: |
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server
(cd http-echo-server && npm install && npm start &)
- name: Build
working-directory: ${{ matrix.sample }}
run: dotnet build Org.OpenAPITools.sln
60 changes: 33 additions & 27 deletions .github/workflows/samples-dotnet6-client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,45 @@ on:
push:
paths:
# build C# API client (multiple frameworks)
- samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/**
- samples/client/petstore/csharp/OpenAPIClientCoreAndNet47/**
# build C# API client (httpclient)
- samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/**
- samples/client/petstore/csharp/OpenAPIClient-httpclient/**
# build C# API client (generichost)
- samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/**
- samples/client/petstore/csharp/OpenAPIClient-generichost-netstandard2.0/**
# build C# API client (netcore)
- samples/client/petstore/csharp-netcore/OpenAPIClient/**
- samples/client/petstore/csharp-netcore/OpenAPIClientCore/**
- samples/client/petstore/csharp/OpenAPIClient/**
- samples/client/petstore/csharp/OpenAPIClientCore/**
# build C# API client (.net framework 4.7)
- samples/client/petstore/csharp-netcore/OpenAPIClient-net47/**
- samples/client/petstore/csharp/OpenAPIClient-net47/**
# build C# API client (.net framework 4.8)
- samples/client/petstore/csharp-netcore/OpenAPIClient-net48/**
- samples/client/petstore/csharp/OpenAPIClient-net48/**
# build C# API client (.net 5.0)
- samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/**
- samples/client/petstore/csharp/OpenAPIClient-net5.0/**
# build C# API client (.net 5.0 with ConditionalSerialization)
- samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/**
- samples/client/petstore/csharp/OpenAPIClient-ConditionalSerialization/**
# build C# API client (property, parameter name mappings)
- samples/client/petstore/csharp-restsharp-name-parameter-mappings/**
pull_request:
paths:
# build C# API client (multiple frameworks)
- samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/**
- samples/client/petstore/csharp/OpenAPIClientCoreAndNet47/**
# build C# API client (httpclient)
- samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/**
- samples/client/petstore/csharp/OpenAPIClient-httpclient/**
# build C# API client (generichost)
- samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/**
- samples/client/petstore/csharp/OpenAPIClient-generichost-netstandard2.0/**
# build C# API client (netcore)
- samples/client/petstore/csharp-netcore/OpenAPIClient/**
- samples/client/petstore/csharp-netcore/OpenAPIClientCore/**
- samples/client/petstore/csharp/OpenAPIClient/**
- samples/client/petstore/csharp/OpenAPIClientCore/**
# build C# API client (.net framework 4.7)
- samples/client/petstore/csharp-netcore/OpenAPIClient-net47/**
- samples/client/petstore/csharp/OpenAPIClient-net47/**
# build C# API client (.net framework 4.8)
- samples/client/petstore/csharp-netcore/OpenAPIClient-net48/**
- samples/client/petstore/csharp/OpenAPIClient-net48/**
# build C# API client (.net 5.0)
- samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/**
- samples/client/petstore/csharp/OpenAPIClient-net5.0/**
# build C# API client (.net 5.0 with ConditionalSerialization)
- samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/**
- samples/client/petstore/csharp/OpenAPIClient-ConditionalSerialization/**
# build C# API client (property, parameter name mappings)
- samples/client/petstore/csharp-restsharp-name-parameter-mappings/**
jobs:
build:
name: Build .Net clients
Expand All @@ -49,22 +53,24 @@ jobs:
sample:
# clients
# build C# API client (multiple frameworks)
- samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/
- samples/client/petstore/csharp/OpenAPIClientCoreAndNet47/
# build C# API client (httpclient)
- samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/
- samples/client/petstore/csharp/OpenAPIClient-httpclient/
# build C# API client (generichost)
- samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/
- samples/client/petstore/csharp/OpenAPIClient-generichost-netstandard2.0/
# build C# API client (netcore)
- samples/client/petstore/csharp-netcore/OpenAPIClient/
- samples/client/petstore/csharp-netcore/OpenAPIClientCore/
- samples/client/petstore/csharp/OpenAPIClient/
- samples/client/petstore/csharp/OpenAPIClientCore/
# build C# API client (.net framework 4.7)
- samples/client/petstore/csharp-netcore/OpenAPIClient-net47/
- samples/client/petstore/csharp/OpenAPIClient-net47/
# build C# API client (.net framework 4.8)
- samples/client/petstore/csharp-netcore/OpenAPIClient-net48/
- samples/client/petstore/csharp/OpenAPIClient-net48/
# build C# API client (.net 5.0)
- samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/
- samples/client/petstore/csharp/OpenAPIClient-net5.0/
# build C# API client (.net 5.0 with ConditionalSerialization)
- samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/
- samples/client/petstore/csharp/OpenAPIClient-ConditionalSerialization/
# build C# API client (property, parameter name mappings)
- samples/client/petstore/csharp-restsharp-name-parameter-mappings
steps:
- uses: actions/checkout@v3
- uses: actions/[email protected]
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/samples-dotnet6-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
- 'samples/server/petstore/aspnetcore-6.0/**'
- 'samples/server/petstore/aspnetcore-6.0-pocoModels/**'
- 'samples/server/petstore/aspnetcore-6.0-useSwashBuckle/**'
- 'samples/server/petstore/aspnetcore-6.0-useNewtonsoft/**'
pull_request:
paths:
- 'samples/server/petstore/aspnetcore-6.0/**'
Expand Down
Loading

0 comments on commit c9fb20e

Please sign in to comment.