Skip to content

Commit 15ab1d5

Browse files
authored
Merge pull request #158 from CiscoM31/refresh/072023
Pull in the latest master from upstream
2 parents a0e05b8 + 4845e5d commit 15ab1d5

File tree

28,474 files changed

+1496336
-1118151
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

28,474 files changed

+1496336
-1118151
lines changed

.circleci/config.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,25 @@ commands: # a reusable command with parameters
3131
# 'See docs on artifact collection here https://circleci.com/docs/2.0/artifacts/'
3232
- run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
3333
# This is based on your 1.0 configuration file or project settings
34+
#- run:
35+
# command: sudo update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java; sudo update-alternatives --set javac /usr/lib/jvm/java-8-openjdk-amd64/bin/javac; echo -e "export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64" >> $BASH_ENV
3436
- run:
35-
command: sudo update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java; sudo update-alternatives --set javac /usr/lib/jvm/java-8-openjdk-amd64/bin/javac; echo -e "export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64" >> $BASH_ENV
37+
command: java -version
3638
- run:
3739
command: 'sudo docker info >/dev/null 2>&1 || sudo service docker start; '
3840
- run:
39-
command: |-
40-
printf '127.0.0.1 petstore.swagger.io
41-
' | sudo tee -a /etc/hosts
41+
command: |
42+
sudo tee -a /etc/hosts \<<< "127.0.0.1 path.v1.test.openapi-generator.tech"
43+
sudo tee -a /etc/hosts \<<< "127.0.0.1 path.v2.test.openapi-generator.tech"
44+
sudo tee -a /etc/hosts \<<< "127.0.0.111 path.v3.test.openapi-generator.tech"
45+
sudo tee -a /etc/hosts \<<< "127.0.0.1 operation.v1.test.openapi-generator.tech"
46+
sudo tee -a /etc/hosts \<<< "127.0.0.1 operation.v2.test.openapi-generator.tech"
47+
sudo tee -a /etc/hosts \<<< "127.0.0.111 operation.v3.test.openapi-generator.tech"
48+
sudo tee -a /etc/hosts \<<< "127.0.0.1 server.v1.test.openapi-generator.tech"
49+
sudo tee -a /etc/hosts \<<< "127.0.0.1 server.v2.test.openapi-generator.tech"
50+
sudo tee -a /etc/hosts \<<< "127.0.0.111 server.v3.test.openapi-generator.tech"
51+
sudo tee -a /etc/hosts \<<< "127.0.0.1 petstore.swagger.io"
52+
cat /etc/hosts
4253
# - run: docker pull openapitools/openapi-petstore
4354
# - run: docker run -d -e OPENAPI_BASE_PATH=/v3 -e DISABLE_API_KEY=1 -e DISABLE_OAUTH=1 -p 80:8080 openapitools/openapi-petstore
4455
- run: docker pull swaggerapi/petstore
@@ -47,7 +58,7 @@ commands: # a reusable command with parameters
4758
- run: sleep 30
4859
- run: cat /etc/hosts
4960
# Test
50-
- run: mvn --no-snapshot-updates --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
61+
- run: ./mvnw --no-snapshot-updates --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
5162
- run:
5263
name: "Setup custom environment variables"
5364
command: echo 'export CIRCLE_NODE_INDEX="<<parameters.nodeNo>>"' >> $BASH_ENV

.devcontainer/devcontainer.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"name": "OpenAPIGenerator",
3+
"image": "mcr.microsoft.com/devcontainers/base:debian",
4+
"features": {
5+
"ghcr.io/devcontainers/features/java:1": {
6+
"version": "11",
7+
"installMaven": true
8+
},
9+
"ghcr.io/devcontainers/features/node:1": {
10+
"version": "lts"
11+
},
12+
"ghcr.io/snebjorn/devcontainer-feature/chromium:latest": {}
13+
},
14+
// Configure tool-specific properties.
15+
"customizations": {
16+
// Configure properties specific to VS Code.
17+
"vscode": {
18+
// Set *default* container specific settings.json values on container create.
19+
"settings": {
20+
"java.configuration.runtimes": [
21+
{
22+
"name": "JavaSE-11",
23+
"path": "/usr/local/sdkman/candidates/java/11.0.16.1-ms",
24+
"sources": "/usr/local/sdkman/candidates/java/11.0.16.1-ms/lib/src.zip",
25+
"javadoc": "https://docs.oracle.com/en/java/javase/11/docs/api",
26+
"default": true
27+
}
28+
]
29+
},
30+
// Add the IDs of extensions you want installed when the container is created.
31+
"extensions": [
32+
"vscjava.vscode-java-pack",
33+
"attilabuti.mustache-syntax-vscode",
34+
"formulahendry.code-runner",
35+
"visualstudioexptteam.vscodeintellicode",
36+
"42crunch.vscode-openapi",
37+
"mermade.openapi-lint"
38+
]
39+
}
40+
},
41+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
42+
// "forwardPorts": [],
43+
// Use 'postCreateCommand' to run commands after the container is created.
44+
// "postCreateCommand": "mvn clean package -DskipTests",
45+
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
46+
"remoteUser": "vscode"
47+
}

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake

.github/.test/samples.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,6 +1226,12 @@
12261226
"Client: TypeScript"
12271227
]
12281228
},
1229+
{
1230+
"input": "typescript-nestjs-v8-petstore-provided-in-root.sh",
1231+
"matches": [
1232+
"Client: TypeScript"
1233+
]
1234+
},
12291235
{
12301236
"input": "typescript-node-petstore-with-npm.sh",
12311237
"matches": [

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,10 @@
1616
These must match the expectations made by your contribution.
1717
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*`.
1818
For Windows users, please run the script in [Git BASH](https://gitforwindows.org/).
19-
- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master` (6.1.0) (minor release - breaking changes with fallbacks), `7.0.x` (breaking changes without fallbacks)
19+
- [ ] In case you are adding a new generator, run the following additional script :
20+
```
21+
./bin/utils/ensure-up-to-date
22+
```
23+
Commit all changed files.
24+
- [ ] 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)
2025
- [ ] 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.

.github/actions/run-samples/action.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ inputs:
1515
runs:
1616
using: "composite"
1717
steps:
18-
- run: mvn --no-snapshot-updates --batch-mode --quiet ${{ inputs.goal }} -P${{ inputs.name }} -Dintegration-test -Dmaven.javadoc.skip=true ${{ inputs.args }}
19-
shell: bash
18+
- run: ./mvnw clean --no-snapshot-updates --batch-mode --quiet ${{ inputs.goal }} -P${{ inputs.name }} -Dintegration-test -Dmaven.javadoc.skip=true ${{ inputs.args }}
19+
shell: bash

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,9 @@ updates:
44
directory: "/"
55
schedule:
66
interval: "daily"
7+
- package-ecosystem: "maven"
8+
directory: "/"
9+
schedule:
10+
interval: "weekly"
11+
allow:
12+
- dependency-name: "com.gradle.*"

.github/workflows/check-supported-versions.yaml

Lines changed: 0 additions & 95 deletions
This file was deleted.

.github/workflows/docker.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Docker tests
2+
3+
on:
4+
push:
5+
paths:
6+
- Dockerfile
7+
- run-in-docker.sh
8+
- pom.xml
9+
- modules/openapi-generator-online/pom.xml
10+
- modules/openapi-generator-online/Dockerfile
11+
pull_request:
12+
paths:
13+
- Dockerfile
14+
- run-in-docker.sh
15+
- pom.xml
16+
- modules/openapi-generator-online/pom.xml
17+
- modules/openapi-generator-online/Dockerfile
18+
jobs:
19+
build:
20+
name: 'Build: Docker'
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Check out code
24+
uses: actions/checkout@v3
25+
26+
- name: Test run-in-docker.sh
27+
shell: bash
28+
run: |
29+
sed -i 's/ -it / /g' run-in-docker.sh
30+
./run-in-docker.sh mvn clean install
31+
32+
- name: Build Dockerfile
33+
shell: bash
34+
run: docker build .
35+
36+
- name: Build modules/openapi-generator-online
37+
shell: bash
38+
run: |
39+
docker build modules/openapi-generator-online/ -t test
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Gradle plugin tests
2+
3+
on:
4+
push:
5+
paths:
6+
- modules/openapi-generator-gradle-plugin/**
7+
pull_request:
8+
paths:
9+
- modules/openapi-generator-gradle-plugin/**
10+
11+
jobs:
12+
test:
13+
name: Gradle plugin tests
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Set up JDK 11
18+
uses: actions/setup-java@v3
19+
with:
20+
java-version: 11
21+
distribution: 'temurin'
22+
- name: Cache maven dependencies
23+
uses: actions/cache@v3
24+
env:
25+
cache-name: cache-maven-repository
26+
with:
27+
path: |
28+
~/.m2/repository
29+
~/.gradle
30+
!~/.gradle/caches/modules-2/modules-2.lock
31+
!~/.gradle/caches/*/plugin-resolution/
32+
!~/.m2/repository/org/openapitools/
33+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
34+
restore-keys: |
35+
${{ runner.os }}-test-gradle-plugin-${{ env.cache-name }}-
36+
${{ runner.os }}-test-gradle-plugin-
37+
- name: Run tests
38+
env:
39+
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
40+
run: |
41+
./mvnw clean --no-snapshot-updates --batch-mode --quiet install -DskipTests -Dorg.slf4j.simpleLogger.defaultLogLevel=error
42+
(cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew buildGoSdk) # using gradle-6.8.3 via wrapper
43+
(cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew openApiGenerate)
44+
(cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew buildDotnetSdk)
45+
(cd modules/openapi-generator-gradle-plugin/samples/local-spec && gradle buildJavaResttemplateSdk) # not using gradle wrapper

0 commit comments

Comments
 (0)