Skip to content

Commit

Permalink
Merge branch 'OpenAPITools:master' into bugfix/Incorrect-hashCode-and…
Browse files Browse the repository at this point in the history
…-==-overide-for-fields-withList
  • Loading branch information
vasilich6107 authored Apr 25, 2024
2 parents 5760d9a + a5d463d commit f0e3460
Show file tree
Hide file tree
Showing 13,841 changed files with 312,017 additions and 174,081 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
17 changes: 16 additions & 1 deletion .github/workflows/openapi-generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,23 @@ jobs:
with:
name: openapi-generator-cli.jar
path: modules/openapi-generator-cli/target
- name: Delete samples that are entirely generated
run: |
rm -rf samples/client/petstore/csharp/generichost/net8/AllOf
rm -rf samples/client/petstore/csharp/generichost/net8/AnyOf
rm -rf samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare
rm -rf samples/client/petstore/csharp/generichost/net8/FormModels
rm -rf samples/client/petstore/csharp/generichost/net8/NullReferenceTypes
rm -rf samples/client/petstore/csharp/generichost/net8/OneOf
rm -rf samples/client/petstore/csharp/generichost/net8/Petstore
rm -rf samples/client/petstore/csharp/generichost/net8/SourceGeneration
rm -rf samples/client/petstore/csharp/generichost/net8/UseDateTimeForDate
rm -rf samples/client/petstore/csharp/generichost/standard2.0/Petstore
- name: Generate samples
run: bash bin/generate-samples.sh
run: |
bash bin/generate-samples.sh
# when a sample is deleted, you have to generate it twice for all files to get created
bash bin/generate-samples.sh
- name: Verify git status
run: |
if [[ "$(git status --porcelain)" != "" ]]; then
Expand Down
34 changes: 13 additions & 21 deletions .github/workflows/samples-dotnet-standard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,16 @@ name: Samples C# .Net Standard Client
on:
push:
paths:
# build C# API client (netstandard)
- samples/client/petstore/csharp/OpenAPIClient/**
- samples/client/petstore/csharp/*netstandard*/**
# build C# API client (netstandard with ConditionalSerialization)
- samples/client/petstore/csharp/OpenAPIClient-ConditionalSerialization/**
# build C# API client (netstandard httpclient)
- samples/client/petstore/csharp/OpenAPIClient-httpclient/**
- samples/client/petstore/csharp/generichost/standard2.0/**
- samples/client/petstore/csharp/httpclient/standard2.0/**
- samples/client/petstore/csharp/restsharp/standard2.0/**
- samples/client/petstore/csharp/unityWebRequest/standard2.0/**
pull_request:
paths:
# build C# API client (netstandard)
- samples/client/petstore/csharp/OpenAPIClient/**
- samples/client/petstore/csharp/*netstandard*/**
# build C# API client (netstandard with ConditionalSerialization)
- samples/client/petstore/csharp/OpenAPIClient-ConditionalSerialization/**
# build C# API client (netstandard httpclient)
- samples/client/petstore/csharp/OpenAPIClient-httpclient/**
- samples/client/petstore/csharp/generichost/standard2.0/**
- samples/client/petstore/csharp/httpclient/standard2.0/**
- samples/client/petstore/csharp/restsharp/standard2.0/**
- samples/client/petstore/csharp/unityWebRequest/standard2.0/**
jobs:
build:
name: Build .Net projects
Expand All @@ -27,13 +21,11 @@ jobs:
fail-fast: false
matrix:
sample:
# build C# API client (netstandard)
- samples/client/petstore/csharp/OpenAPIClient/
- samples/client/petstore/csharp/OpenAPIClient-generichost-netstandard2.0/
# build C# API client (netstandard with ConditionalSerialization)
- samples/client/petstore/csharp/OpenAPIClient-ConditionalSerialization/
# build C# API client (netstandard httpclient)
- samples/client/petstore/csharp/OpenAPIClient-httpclient/
- samples/client/petstore/csharp/generichost/standard2.0/Petstore/
- samples/client/petstore/csharp/httpclient/standard2.0/Petstore/
- samples/client/petstore/csharp/restsharp/standard2.0/Petstore/
- samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/
# - samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/
steps:
- uses: actions/checkout@v4
- uses: actions/[email protected]
Expand Down
37 changes: 19 additions & 18 deletions .github/workflows/samples-dotnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ name: Samples C# .Net 8 Clients
on:
push:
paths:
- samples/client/petstore/csharp/OpenAPIClient-generichost-manual-tests/**
- samples/client/petstore/csharp/*net6.0*/**
- samples/client/petstore/csharp/*net7.0*/**
- samples/client/petstore/csharp/OpenAPIClient-*latest*/**
- samples/client/petstore/csharp/generichost/net8/**
- samples/client/petstore/csharp/httpclient/net8/**
- samples/client/petstore/csharp/restsharp/net8/**
- samples/client/petstore/csharp/unityWebRequest/net8/**
pull_request:
paths:
- samples/client/petstore/csharp/OpenAPIClient-generichost-manual-tests/**
- samples/client/petstore/csharp/*net6.0*/**
- samples/client/petstore/csharp/*net7.0*/**
- samples/client/petstore/csharp/OpenAPIClient-*latest*/**
- samples/client/petstore/csharp/generichost/net8/**
- samples/client/petstore/csharp/httpclient/net8/**
- samples/client/petstore/csharp/restsharp/net8/**
- samples/client/petstore/csharp/unityWebRequest/net8/**
jobs:
build:
name: Build .Net projects
Expand All @@ -21,16 +21,17 @@ jobs:
fail-fast: false
matrix:
sample:
# clients
- samples/client/petstore/csharp/OpenAPIClient-generichost-manual-tests
- samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0
- samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt
- samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration
- samples/client/petstore/csharp/OpenAPIClient-generichost-net7.0-useDateTimeForDate
- samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-allOf
- samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-anyOf
- samples/client/petstore/csharp/OpenAPIClient-generichost-netcore-latest-oneOf
- samples/client/petstore/csharp/OpenAPIClient-net7.0-useDateTimeForDate
- samples/client/petstore/csharp/generichost/net8/AllOf
- samples/client/petstore/csharp/generichost/net8/AnyOf
- samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare
- samples/client/petstore/csharp/generichost/net8/FormModels
- samples/client/petstore/csharp/generichost/net8/ManualPetstoreTests
- samples/client/petstore/csharp/generichost/net8/ManualSourceGenerationTests
- samples/client/petstore/csharp/generichost/net8/NullReferenceTypes
- samples/client/petstore/csharp/generichost/net8/OneOf
- samples/client/petstore/csharp/generichost/net8/Petstore
- samples/client/petstore/csharp/generichost/net8/SourceGeneration
- samples/client/petstore/csharp/generichost/net8/UseDateTimeForDate
steps:
- uses: actions/checkout@v4
- uses: actions/[email protected]
Expand Down
33 changes: 3 additions & 30 deletions .github/workflows/samples-dotnet6-client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,10 @@ name: Samples C# .Net 6 Client
on:
push:
paths:
# build C# API client (httpclient)
- samples/client/petstore/csharp/OpenAPIClient-httpclient/**
# build C# API client (.net framework 4.7)
- samples/client/petstore/csharp/OpenAPIClient-net47/**
# build C# API client (.net framework 4.8)
- samples/client/petstore/csharp/OpenAPIClient-net48/**
# build C# API client (property, parameter name mappings)
- samples/client/petstore/csharp/OpenAPIClient-restsharp-name-parameter-mappings/**
# build C# API client (multiple frameworks)
- samples/client/petstore/csharp/OpenAPIClientCoreAndNet47/**
- samples/client/petstore/csharp/restsharp/net6/**
pull_request:
paths:
# build C# API client (httpclient)
- samples/client/petstore/csharp/OpenAPIClient-httpclient/**
# build C# API client (.net framework 4.7)
- samples/client/petstore/csharp/OpenAPIClient-net47/**
# build C# API client (.net framework 4.8)
- samples/client/petstore/csharp/OpenAPIClient-net48/**
# build C# API client (property, parameter name mappings)
- samples/client/petstore/csharp/OpenAPIClient-restsharp-name-parameter-mappings/**
# build C# API client (multiple frameworks)
- samples/client/petstore/csharp/OpenAPIClientCoreAndNet47/**
- samples/client/petstore/csharp/restsharp/net6/**
jobs:
build:
name: Build .Net clients
Expand All @@ -33,16 +15,7 @@ jobs:
fail-fast: false
matrix:
sample:
# build C# API client (httpclient)
- samples/client/petstore/csharp/OpenAPIClient-httpclient/
# build C# API client (.net framework 4.7)
- samples/client/petstore/csharp/OpenAPIClient-net47/
# build C# API client (.net framework 4.8)
- samples/client/petstore/csharp/OpenAPIClient-net48/
# build C# API client (property, parameter name mappings)
- samples/client/petstore/csharp/OpenAPIClient-restsharp-name-parameter-mappings/
# build C# API client (multiple frameworks)
- samples/client/petstore/csharp/OpenAPIClientCoreAndNet47/
- samples/client/petstore/csharp/restsharp/net6/ParameterMappings/
steps:
- uses: actions/checkout@v4
- uses: actions/[email protected]
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/samples-java-client-jdk11.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ on:
- samples/client/others/java/okhttp-gson-oneOf/**
- samples/client/others/java/resttemplate-useAbstractionForFiles/**
- samples/client/others/java/webclient-useAbstractionForFiles/**
- samples/client/others/java/jersey2-oneOf-duplicates/**
- samples/client/others/java/jersey2-oneOf-Mixed/**
pull_request:
paths:
- 'samples/client/petstore/java/**'
Expand All @@ -25,6 +27,8 @@ on:
- samples/client/others/java/okhttp-gson-oneOf/**
- samples/client/others/java/resttemplate-useAbstractionForFiles/**
- samples/client/others/java/webclient-useAbstractionForFiles/**
- samples/client/others/java/jersey2-oneOf-duplicates/**
- samples/client/others/java/jersey2-oneOf-Mixed/**
jobs:
build:
name: Build Java Client JDK11
Expand Down Expand Up @@ -69,8 +73,11 @@ jobs:
- samples/client/petstore/java/resttemplate-swagger2/
- samples/openapi3/client/petstore/java/jersey2-java8-swagger2/
- samples/client/others/java/okhttp-gson-oneOf/
- samples/client/echo_api/java/okhttp-gson-user-defined-templates/
- samples/client/others/java/resttemplate-useAbstractionForFiles/
- samples/client/others/java/webclient-useAbstractionForFiles/
- samples/client/others/java/jersey2-oneOf-duplicates/
- samples/client/others/java/jersey2-oneOf-Mixed/
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/samples-julia.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
- uses: julia-actions/setup-julia@v2
with:
version: 1.8
arch: x64
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/samples-kotlin-client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
- samples/client/petstore/kotlin
- samples/client/petstore/kotlin-gson
- samples/client/petstore/kotlin-jackson
- samples/client/petstore/kotlin-model-prefix-type-mappings
# needs Android configured
#- samples/client/petstore/kotlin-json-request-string
- samples/client/petstore/kotlin-jvm-okhttp4-coroutines
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/samples-kotlin-echo-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
sample:
# clients
- samples/client/echo_api/kotlin-jvm-spring-3-restclient
- samples/client/echo_api/kotlin-model-prefix-type-mappings
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/samples-php8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ on:
push:
paths:
- samples/server/petstore/php-symfony/SymfonyBundle-php/**
- samples/server/petstore/php-flight/**
pull_request:
paths:
- samples/server/petstore/php-symfony/SymfonyBundle-php/**
- samples/server/petstore/php-flight/**
jobs:
build:
name: Build PHP projects
Expand All @@ -17,6 +19,7 @@ jobs:
sample:
# servers
- samples/server/petstore/php-symfony/SymfonyBundle-php/
- samples/server/petstore/php-flight/
steps:
- uses: actions/checkout@v4
- name: Setup PHP with tools
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/samples-scala.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
- samples/server/petstore/scalatra
- samples/server/petstore/scala-finch # cannot be tested with jdk11
- samples/server/petstore/scala-http4s-server
- samples/server/petstore/scala-cask
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/samples-spring.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
- samples/openapi3/client/petstore/spring-cloud-async
- samples/openapi3/client/petstore/spring-cloud-spring-pageable
- samples/client/petstore/spring-cloud-tags
- samples/client/petstore/spring-cloud-auth
- samples/client/petstore/spring-cloud-deprecated
# servers
- samples/server/petstore/springboot
Expand Down
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
4 changes: 1 addition & 3 deletions CI/circle_parallel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if [ "$NODE_INDEX" = "1" ]; then
echo "Running node $NODE_INDEX ..."
java -version

sudo apt-get -y install cpanminus libmagic-dev
sudo apt-get -y install cpanminus

(cd samples/client/petstore/perl && /bin/bash ./test.bash)
(cd samples/client/petstore/ruby && mvn integration-test)
Expand Down Expand Up @@ -112,5 +112,3 @@ else
(cd samples/client/petstore/java/apache-httpclient && 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 f0e3460

Please sign in to comment.