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 Jun 12, 2024
2 parents f5236ef + e8bbfe2 commit 9303787
Show file tree
Hide file tree
Showing 29,824 changed files with 2,500,338 additions and 610,050 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
98 changes: 36 additions & 62 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,54 +57,43 @@ commands: # a reusable command with parameters
- run: docker ps -a
- run: sleep 30
- run: cat /etc/hosts
# Test
- run: ./mvnw --no-snapshot-updates --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- run: export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m"
- run:
name: "Setup custom environment variables"
command: echo 'export CIRCLE_NODE_INDEX="<<parameters.nodeNo>>"' >> $BASH_ENV
- run: ./CI/circle_parallel.sh
# Save dependency cache
- save_cache:
key: source-v2-{{ .Branch }}-{{ .Revision }}
paths:
# This is a broad list of cache paths to include many possible development environments
# You can probably delete some of these entries
- vendor/bundle
- ~/.nvm
- ~/.pyenv
- ~/virtualenvs
- ~/.m2
- ~/.ivy2
- ~/.sbt
- ~/.bundle
- ~/.go_workspace
- ~/.gradle
- ~/.cache/bower
- ".git"
- ~/.stack
- /home/circleci/OpenAPITools/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work
- ~/R
# save "default" cache using the key "source-v2-"
- save_cache:
key: source-v2-
paths:
# This is a broad list of cache paths to include many possible development environments
# You can probably delete some of these entries
- vendor/bundle
- ~/.nvm
- ~/.pyenv
- ~/virtualenvs
- ~/.m2
- ~/.ivy2
- ~/.sbt
- ~/.bundle
- ~/.go_workspace
- ~/.gradle
- ~/.cache/bower
- ".git"
- ~/.stack
- /home/circleci/OpenAPITools/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work
- ~/R
#- save_cache:
# key: source-v2-{{ .Branch }}-{{ .Revision }}
# paths:
# # This is a broad list of cache paths to include many possible development environments
# # You can probably delete some of these entries
# - ~/.m2
# - ~/.ivy2
# - ~/.sbt
# - ~/.bundle
# - ~/.go_workspace
# - ~/.gradle
# - ".git"
# - ~/.stack
# - ~/R
## save "default" cache using the key "source-v2-"
#- save_cache:
# key: source-v2-
# paths:
# # This is a broad list of cache paths to include many possible development environments
# # You can probably delete some of these entries
# - vendor/bundle
# - ~/.m2
# - ~/.ivy2
# - ~/.sbt
# - ~/.bundle
# - ~/.go_workspace
# - ~/.gradle
# - ~/.cache/bower
# - ".git"
# - ~/.stack
# - ~/R
# Teardown
# If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
# Save test results
Expand Down Expand Up @@ -152,7 +141,7 @@ commands: # a reusable command with parameters
jobs:
node0:
machine:
image: ubuntu-2004:202201-02
image: ubuntu-2004:2024.01.1
working_directory: ~/OpenAPITools/openapi-generator
shell: /bin/bash --login
environment:
Expand All @@ -165,7 +154,7 @@ jobs:
nodeNo: "0"
node1:
machine:
image: ubuntu-2004:202201-02
image: ubuntu-2004:2024.01.1
working_directory: ~/OpenAPITools/openapi-generator
shell: /bin/bash --login
environment:
Expand All @@ -178,7 +167,7 @@ jobs:
nodeNo: "1"
node2:
machine:
image: ubuntu-2004:202201-02
image: ubuntu-2004:2024.01.1
working_directory: ~/OpenAPITools/openapi-generator
shell: /bin/bash --login
environment:
Expand All @@ -191,7 +180,7 @@ jobs:
nodeNo: "2"
node3:
machine:
image: ubuntu-2004:202201-02
image: ubuntu-2004:2024.01.1
working_directory: ~/OpenAPITools/openapi-generator
shell: /bin/bash --login
environment:
Expand All @@ -203,20 +192,6 @@ jobs:
- checkout
- command_build_and_test:
nodeNo: "3"
node4:
docker:
- image: fkrull/multi-python
working_directory: ~/OpenAPITools/openapi-generator
shell: /bin/bash --login
environment:
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
DOCKER_GENERATOR_IMAGE_NAME: openapitools/openapi-generator
DOCKER_CODEGEN_CLI_IMAGE_NAME: openapitools/openapi-generator-cli
steps:
- checkout
- command_docker_build_and_test:
nodeNo: "4"
workflows:
version: 2
build:
Expand All @@ -225,4 +200,3 @@ workflows:
- node1
- node2
- node3
- node4
12 changes: 9 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@
"ghcr.io/devcontainers/features/node:1": {
"version": "lts"
},
"ghcr.io/snebjorn/devcontainer-feature/chromium:latest": {}
"ghcr.io/devcontainers/features/rust:1": {},
"ghcr.io/snebjorn/devcontainer-feature/chromium:latest": {},
"docker-in-docker": {
"version": "latest",
"moby": true,
"dockerDashComposeVersion": "v1"
}
},
// Configure tool-specific properties.
"customizations": {
Expand All @@ -20,8 +26,8 @@
"java.configuration.runtimes": [
{
"name": "JavaSE-11",
"path": "/usr/local/sdkman/candidates/java/11.0.16.1-ms",
"sources": "/usr/local/sdkman/candidates/java/11.0.16.1-ms/lib/src.zip",
"path": "/usr/local/sdkman/candidates/java/current",
"sources": "/usr/local/sdkman/candidates/java/current/lib/src.zip",
"javadoc": "https://docs.oracle.com/en/java/javase/11/docs/api",
"default": true
}
Expand Down
2 changes: 1 addition & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
use flake
has nix && use flake
24 changes: 0 additions & 24 deletions .github/.test/samples.json
Original file line number Diff line number Diff line change
Expand Up @@ -325,12 +325,6 @@
"Client: Java"
]
},
{
"input": "java-petstore-jersey1.sh",
"matches": [
"Client: Java"
]
},
{
"input": "java-petstore-jersey2-java6.sh",
"matches": [
Expand Down Expand Up @@ -590,18 +584,6 @@
"Server: Java"
]
},
{
"input": "jaxrs-jersey1-petstore-server.sh",
"matches": [
"Server: Java"
]
},
{
"input": "jaxrs-jersey1-usetags-petstore-server.sh",
"matches": [
"Server: Java"
]
},
{
"input": "jaxrs-petstore-server-datelib-j8.sh",
"matches": [
Expand Down Expand Up @@ -806,12 +788,6 @@
"Client: Python"
]
},
{
"input": "python-server-flask-petstore-python2.sh",
"matches": [
"Server: Python"
]
},
{
"input": "python-server-flask-petstore.sh",
"matches": [
Expand Down
16 changes: 11 additions & 5 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,14 @@ modules/openapi-generator-cli/**/* @jimschubert
modules/openapi-generator-gradle-plugin/**/* @jimschubert
modules/openapi-generator-maven-plugin/**/* @jimschubert

# Martin Delille
/Users/martin/dev/clone/openapi-generator/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQtClientCodegen.java @martindelille
/Users/martin/dev/clone/openapi-generator/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQtAbstractCodegen.java @martindelille
/Users/martin/dev/clone/openapi-generator/modules/openapi-generator/src/main/resources/cpp-qt-client @martindelille
/Users/martin/dev/clone/openapi-generator/samples/client/petstore/cpp-qt @martindelille
# cpp-qt-client technical committee
modules/openapi-generator/src/main/resources/cpp-qt-client/**/* @ravinikam
samples/client/petstore/cpp-qt/**/* @ravinikam
modules/openapi-generator/src/main/resources/cpp-qt-client/**/* @stkrwork
samples/client/petstore/cpp-qt/**/* @stkrwork
modules/openapi-generator/src/main/resources/cpp-qt-client/**/* @etherealjoy
samples/client/petstore/cpp-qt/**/* @etherealjoy
modules/openapi-generator/src/main/resources/cpp-qt-client/**/* @martindelille
samples/client/petstore/cpp-qt/**/* @martindelille
modules/openapi-generator/src/main/resources/cpp-qt-client/**/* @muttleyxd
samples/client/petstore/cpp-qt/**/* @muttleyxd
12 changes: 4 additions & 8 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,14 @@
- [ ] 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
```
(For Windows users, please run the script in [Git BASH](https://gitforwindows.org/))
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)
IMPORTANT: Do **NOT** purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master` (upcoming 7.6.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.
18 changes: 16 additions & 2 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
@@ -1,33 +1,38 @@
name: Docker tests

on:
workflow_dispatch:
push:
paths:
- Dockerfile
- run-in-docker.sh
- pom.xml
- modules/openapi-generator-online/pom.xml
- modules/openapi-generator-online/Dockerfile
- modules/openapi-generator-cli/pom.xml
- modules/openapi-generator-cli/Dockerfile
pull_request:
paths:
- Dockerfile
- run-in-docker.sh
- pom.xml
- modules/openapi-generator-online/pom.xml
- modules/openapi-generator-online/Dockerfile
- modules/openapi-generator-cli/pom.xml
- modules/openapi-generator-cli/Dockerfile
jobs:
build:
name: 'Build: Docker'
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
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
./run-in-docker.sh mvn -B clean install
- name: Build Dockerfile
shell: bash
Expand All @@ -37,3 +42,12 @@ jobs:
shell: bash
run: |
docker build modules/openapi-generator-online/ -t test
- name: Build and test modules/openapi-generator-cli
shell: bash
run: |
cp docker-entrypoint.sh ./modules/openapi-generator-cli
docker build modules/openapi-generator-cli/ -t cli-test
docker run --rm -v "${PWD}:/local" cli-test generate \
-i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml \
-g go \
-o /local/out/go
6 changes: 3 additions & 3 deletions .github/workflows/gradle-plugin-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ 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
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'temurin'
- name: Cache maven dependencies
uses: actions/cache@v3
uses: actions/cache@v4
env:
cache-name: cache-maven-repository
with:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/gradle-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- 'samples/client/petstore/java/**'
- 'samples/openapi3/client/petstore/java/**'
env:
GRADLE_VERSION: 7.2
GRADLE_VERSION: 8.7

jobs:
build:
Expand All @@ -30,21 +30,21 @@ jobs:
- samples/client/petstore/java/okhttp-gson-group-parameter
- samples/client/petstore/java/webclient-swagger2
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 11
# Cache Gradle Dependencies
- name: Setup Gradle Dependencies Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle.kts') }}

# Cache Gradle Wrapper
- name: Setup Gradle Wrapper Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
Expand Down
Loading

0 comments on commit 9303787

Please sign in to comment.