Skip to content

Commit

Permalink
resolve merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
dreambrother committed May 2, 2024
2 parents 4fe01bb + ef2fa03 commit 3fc798c
Show file tree
Hide file tree
Showing 1,735 changed files with 85,024 additions and 9,983 deletions.
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,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 @@ -154,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 @@ -167,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 @@ -180,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 Down
6 changes: 3 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,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 All @@ -50,4 +50,4 @@
// "postCreateCommand": "mvn clean package -DskipTests",
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
}
}
2 changes: 1 addition & 1 deletion .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 Down
7 changes: 5 additions & 2 deletions .github/workflows/samples-go.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
name: Samples Go
name: Samples Go

on:
push:
paths:
- 'samples/server/petstore/go-echo-server/**'
- 'samples/server/petstore/go-api-server/**'
- 'samples/server/petstore/go-chi-server/**'
- 'samples/server/others/go-server/no-body-path-params/**'
pull_request:
paths:
- 'samples/server/petstore/go-echo-server/**'
- 'samples/server/petstore/go-api-server/**'
- 'samples/server/petstore/go-chi-server/**'
- 'samples/server/others/go-server/no-body-path-params/**'

jobs:
build:
name: Build Go
name: Build Go
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -23,6 +25,7 @@ jobs:
- samples/server/petstore/go-echo-server/
- samples/server/petstore/go-api-server/
- samples/server/petstore/go-chi-server/
- samples/server/others/go-server/no-body-path-params/
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/samples-java-client-echo-api-jdk17.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Java Client (Echo API) JDK17

on:
push:
paths:
- samples/client/echo_api/java/restclient
pull_request:
paths:
- samples/client/echo_api/java/restclient
jobs:
build:
name: Build Java Client JDK17
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# clients
- samples/client/echo_api/java/restclient
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Cache maven dependencies
uses: actions/cache@v4
env:
cache-name: maven-repository
with:
path: |
~/.m2
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Setup node.js
uses: actions/setup-node@v4
- 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: mvn clean package
27 changes: 25 additions & 2 deletions .github/workflows/samples-java-client-jdk17.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ on:
paths:
- samples/client/petstore/java/resttemplate-jakarta/**
- samples/client/petstore/java/webclient-jakarta/**
- samples/client/petstore/java/restclient-*/**
pull_request:
paths:
- samples/client/petstore/java/resttemplate-jakarta/**
- samples/client/petstore/java/webclient-jakarta/**
- samples/client/petstore/java/restclient-*/**
jobs:
build:
name: Build Java Client JDK17
Expand All @@ -20,6 +22,9 @@ jobs:
# clients
- samples/client/petstore/java/resttemplate-jakarta
- samples/client/petstore/java/webclient-jakarta
- samples/client/petstore/java/restclient
- samples/client/petstore/java/restclient-nullable-arrays
- samples/client/petstore/java/restclient-swagger2
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
Expand All @@ -34,9 +39,27 @@ jobs:
path: |
~/.m2
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}

- name: Build with Maven
working-directory: ${{ matrix.sample }}
run: mvn clean package
- name: Build with Gradle

- name: Cache gradle dependencies
uses: actions/cache@v4
env:
cache-name: gradle-caches
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/*.gradle', '**/*.gradle.kts') }}

- name: Cache gradle wrapper
uses: actions/cache@v4
env:
cache-name: gradle-wrapper
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}

- name: Build
working-directory: ${{ matrix.sample }}
run: gradle clean build
run: ./gradlew build -x test
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ samples/client/petstore/cpp-restsdk/CMakeCache.txt
samples/client/petstore/cpp-restsdk/CMakeFiles/
samples/client/petstore/cpp-restsdk/Makefile
samples/client/petstore/cpp-restsdk/cmake_install.cmake
samples/client/petstore/cpp-restsdk/client/CMakeFiles
samples/client/petstore/cpp-restsdk/client/Makefile
samples/client/petstore/cpp-restsdk/client/cmake_install.cmake
samples/client/petstore/cpp-restsdk/client/CppRestPetstoreClientConfig.cmake
samples/client/petstore/cpp-restsdk/client/CMakeCache.txt

#Java/Android
**/.gradle
Expand Down
1 change: 1 addition & 0 deletions CI/circle_parallel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,6 @@ else
(cd samples/client/petstore/java/resteasy && mvn integration-test)
(cd samples/client/petstore/java-micronaut-client && mvn integration-test)
(cd samples/client/petstore/java/apache-httpclient && mvn integration-test)
(cd samples/client/petstore/java/resttemplate-jakarta && mvn integration-test)

fi
24 changes: 22 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Please file the pull request against the correct branch, e.g. `master` for non-b

All the code generators can be found in [modules/openapi-generator/src/main/java/org/openapitools/codegen/languages](https://github.com/openapitools/openapi-generator/tree/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages)

If you want to add a new generator, follow the [new-generator](https://openapi-generator.tech/docs/new-generator) guide.
If you want to add a new generator, follow the [new-generator](https://openapi-generator.tech/docs/new-generator) guide.

### Templates

Expand Down Expand Up @@ -84,6 +84,26 @@ For [Vendor Extensions](https://github.com/OAI/OpenAPI-Specification/blob/master
- For language-specified vendor extension, put it in the form of `x-{lang}-{extension-name}`. e.g. `x-objc-operation-id`, `x-java-feign-retry-limit`
- For a list of existing vendor extensions in use, please refer to https://github.com/openapitools/openapi-generator/wiki/Vendor-Extensions. If you've added new vendor extensions as part of your PR, please update the wiki page.

### Building

The `openapi-generator-cli` can be built using the following command. This will generate the `openapi-generator-cli.jar` in the `modules/openapi-generator-cli/target` directory without running the tests and generating the Javadocs.

```shell
./mvnw clean install -DskipTests -Dmaven.javadoc.skip=true
```

Or on Windows:

```shell
mvnw.cmd clean install -DskipTests -Dmaven.javadoc.skip=true
```

The binary can run via `java -jar`. For example:

```shell
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar help
```

### Testing

To add test cases (optional) covering the change in the code generator, please refer to [modules/openapi-generator/src/test/java/org/openapitools/codegen](https://github.com/openapitools/openapi-generator/tree/master/modules/openapi-generator/src/test/java/org/openapitools/codegen)
Expand Down Expand Up @@ -112,5 +132,5 @@ See [OpenAPI Tools wiki](https://github.com/OpenAPITools/openapi-generator/wiki/
- File a PR with meaningful title, description and commit messages
- Make sure the option "Allow edits from maintainers" in the PR is selected so that the maintainers can update your PRs with minor fixes, if needed.
- Recommended git settings
- `git config core.autocrlf input` to tell Git convert CRLF to LF on commit but not the other way around
- `git config core.autocrlf input` to tell Git convert CRLF to LF on commit but not the other way around
- To close an issue (e.g. issue 1542) automatically after a PR is merged, use keywords "fix", "close", "resolve" in the PR description, e.g. `fix #1542`. (Ref: [closing issues using keywords](https://help.github.com/articles/closing-issues-using-keywords/))
Loading

0 comments on commit 3fc798c

Please sign in to comment.