Skip to content

Commit 33a68b2

Browse files
committed
commit master
1 parent 47c61f3 commit 33a68b2

7,648 files changed

Lines changed: 66856 additions & 13583 deletions

File tree

Some content is hidden

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

.devcontainer/devcontainer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
"java.configuration.runtimes": [
2727
{
2828
"name": "JavaSE-11",
29-
"path": "/usr/local/sdkman/candidates/java/11.0.16.1-ms",
30-
"sources": "/usr/local/sdkman/candidates/java/11.0.16.1-ms/lib/src.zip",
29+
"path": "/usr/local/sdkman/candidates/java/current",
30+
"sources": "/usr/local/sdkman/candidates/java/current/lib/src.zip",
3131
"javadoc": "https://docs.oracle.com/en/java/javase/11/docs/api",
3232
"default": true
3333
}
@@ -50,4 +50,4 @@
5050
// "postCreateCommand": "mvn clean package -DskipTests",
5151
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
5252
"remoteUser": "vscode"
53-
}
53+
}

.github/workflows/openapi-generator.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,23 @@ jobs:
140140
with:
141141
name: openapi-generator-cli.jar
142142
path: modules/openapi-generator-cli/target
143+
- name: Delete samples that are entirely generated
144+
run: |
145+
rm -rf samples/client/petstore/csharp/generichost/net8/AllOf
146+
rm -rf samples/client/petstore/csharp/generichost/net8/AnyOf
147+
rm -rf samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare
148+
rm -rf samples/client/petstore/csharp/generichost/net8/FormModels
149+
rm -rf samples/client/petstore/csharp/generichost/net8/NullReferenceTypes
150+
rm -rf samples/client/petstore/csharp/generichost/net8/OneOf
151+
rm -rf samples/client/petstore/csharp/generichost/net8/Petstore
152+
rm -rf samples/client/petstore/csharp/generichost/net8/SourceGeneration
153+
rm -rf samples/client/petstore/csharp/generichost/net8/UseDateTimeForDate
154+
rm -rf samples/client/petstore/csharp/generichost/standard2.0/Petstore
143155
- name: Generate samples
144-
run: bash bin/generate-samples.sh
156+
run: |
157+
bash bin/generate-samples.sh
158+
# when a sample is deleted, you have to generate it twice for all files to get created
159+
bash bin/generate-samples.sh
145160
- name: Verify git status
146161
run: |
147162
if [[ "$(git status --porcelain)" != "" ]]; then

.github/workflows/samples-dotnet.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
sample:
2424
- samples/client/petstore/csharp/generichost/net8/AllOf
2525
- samples/client/petstore/csharp/generichost/net8/AnyOf
26+
- samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare
2627
- samples/client/petstore/csharp/generichost/net8/FormModels
2728
- samples/client/petstore/csharp/generichost/net8/ManualPetstoreTests
2829
- samples/client/petstore/csharp/generichost/net8/ManualSourceGenerationTests

.github/workflows/samples-java-client-jdk11.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ jobs:
7373
- samples/client/petstore/java/resttemplate-swagger2/
7474
- samples/openapi3/client/petstore/java/jersey2-java8-swagger2/
7575
- samples/client/others/java/okhttp-gson-oneOf/
76+
- samples/client/echo_api/java/okhttp-gson-user-defined-templates/
7677
- samples/client/others/java/resttemplate-useAbstractionForFiles/
7778
- samples/client/others/java/webclient-useAbstractionForFiles/
7879
- samples/client/others/java/jersey2-oneOf-duplicates/

.github/workflows/samples-php8.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ on:
44
push:
55
paths:
66
- samples/server/petstore/php-symfony/SymfonyBundle-php/**
7+
- samples/server/petstore/php-flight/**
78
pull_request:
89
paths:
910
- samples/server/petstore/php-symfony/SymfonyBundle-php/**
11+
- samples/server/petstore/php-flight/**
1012
jobs:
1113
build:
1214
name: Build PHP projects
@@ -17,6 +19,7 @@ jobs:
1719
sample:
1820
# servers
1921
- samples/server/petstore/php-symfony/SymfonyBundle-php/
22+
- samples/server/petstore/php-flight/
2023
steps:
2124
- uses: actions/checkout@v4
2225
- name: Setup PHP with tools

.github/workflows/samples-scala.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
- samples/server/petstore/scalatra
3333
- samples/server/petstore/scala-finch # cannot be tested with jdk11
3434
- samples/server/petstore/scala-http4s-server
35+
- samples/server/petstore/scala-cask
3536
steps:
3637
- uses: actions/checkout@v4
3738
- uses: actions/setup-java@v4

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ samples/client/petstore/cpp-restsdk/CMakeCache.txt
8585
samples/client/petstore/cpp-restsdk/CMakeFiles/
8686
samples/client/petstore/cpp-restsdk/Makefile
8787
samples/client/petstore/cpp-restsdk/cmake_install.cmake
88+
samples/client/petstore/cpp-restsdk/client/CMakeFiles
89+
samples/client/petstore/cpp-restsdk/client/Makefile
90+
samples/client/petstore/cpp-restsdk/client/cmake_install.cmake
91+
samples/client/petstore/cpp-restsdk/client/CppRestPetstoreClientConfig.cmake
92+
samples/client/petstore/cpp-restsdk/client/CMakeCache.txt
8893

8994
#Java/Android
9095
**/.gradle

CONTRIBUTING.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Please file the pull request against the correct branch, e.g. `master` for non-b
3131

3232
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)
3333

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

3636
### Templates
3737

@@ -84,6 +84,26 @@ For [Vendor Extensions](https://github.com/OAI/OpenAPI-Specification/blob/master
8484
- 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`
8585
- 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.
8686

87+
### Building
88+
89+
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.
90+
91+
```shell
92+
./mvnw clean install -DskipTests -Dmaven.javadoc.skip=true
93+
```
94+
95+
Or on Windows:
96+
97+
```shell
98+
mvnw.cmd clean install -DskipTests -Dmaven.javadoc.skip=true
99+
```
100+
101+
The binary can run via `java -jar`. For example:
102+
103+
```shell
104+
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar help
105+
```
106+
87107
### Testing
88108

89109
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)
@@ -112,5 +132,5 @@ See [OpenAPI Tools wiki](https://github.com/OpenAPITools/openapi-generator/wiki/
112132
- File a PR with meaningful title, description and commit messages
113133
- 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.
114134
- Recommended git settings
115-
- `git config core.autocrlf input` to tell Git convert CRLF to LF on commit but not the other way around
135+
- `git config core.autocrlf input` to tell Git convert CRLF to LF on commit but not the other way around
116136
- 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/))

0 commit comments

Comments
 (0)