Skip to content

Commit 4ea8a16

Browse files
committed
Merge branch 'master' into issue-21259
2 parents 04cc762 + 777b7ee commit 4ea8a16

2,488 files changed

Lines changed: 112339 additions & 12039 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.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Samples cpp oat++ server
2+
3+
on:
4+
push:
5+
branches:
6+
- "samples/server/petstore/cpp-oatpp/**"
7+
pull_request:
8+
paths:
9+
- "samples/server/petstore/cpp-oatpp/**"
10+
11+
env:
12+
GRADLE_VERSION: 6.9
13+
14+
jobs:
15+
build:
16+
name: Build cpp qt client
17+
strategy:
18+
matrix:
19+
sample:
20+
- samples/server/petstore/cpp-oatpp
21+
os:
22+
- ubuntu-latest
23+
- macOS-latest
24+
- windows-latest
25+
runs-on: ${{ matrix.os }}
26+
steps:
27+
- uses: actions/checkout@v4
28+
- name: Build
29+
working-directory: ${{ matrix.sample }}
30+
run: cmake -B build && cmake --build build --verbose

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ jobs:
7171
- samples/client/petstore/java/microprofile-rest-client-mutiny
7272
- samples/client/petstore/java/microprofile-rest-client-3.0
7373
- samples/client/petstore/java/microprofile-rest-client-3.0-jackson
74+
- samples/client/petstore/java/microprofile-rest-client-3.0-jackson-mutiny
7475
- samples/client/petstore/java/microprofile-rest-client-3.0-jackson-with-xml
7576
- samples/client/petstore/java/microprofile-rest-client-3.0-mutiny
7677
- samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter
@@ -133,4 +134,4 @@ jobs:
133134
- name: Build with Gradle
134135
working-directory: ${{ matrix.sample }}
135136
if: ${{ hashFiles('./gradlew') != '' }}
136-
run: ./gradlew build -x test
137+
run: ./gradlew build -x test

.github/workflows/samples-rust.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,54 @@ jobs:
2626
- samples/client/others/rust/
2727
- samples/client/petstore/rust/
2828
- samples/server/petstore/rust-server/
29+
- samples/server/petstore/rust-server-deprecated/
2930
- samples/server/petstore/rust-axum/
3031
steps:
3132
- uses: actions/checkout@v4
3233
- uses: actions-rs/toolchain@v1
3334
with:
3435
toolchain: stable
36+
37+
- name: Rust cache
38+
uses: Swatinem/rust-cache@v2
39+
with:
40+
cache-targets: false # Don't cache workspace target directories as they don't exist
41+
cache-directories:
42+
${{ matrix.sample }}/target
43+
workspaces: |
44+
${{ matrix.sample }}/output/*
45+
3546
- name: Build
3647
working-directory: ${{ matrix.sample }}
3748
run: cargo build --all-targets --all-features
49+
- name: Tests
50+
working-directory: ${{ matrix.sample }}
51+
run: |
52+
set -e
53+
# Skip samples/client/petstore/rust/ as it's tests are failing.
54+
if [[ "${{ matrix.sample }}" == "samples/client/petstore/rust/" ]]; then
55+
echo "Skipping tests for samples/client/petstore/rust/"
56+
exit 0
57+
fi
58+
59+
# Iterate through each example and test various features
60+
for package in $(find . -maxdepth 1 -mindepth 1 -type d)
61+
do
62+
# Not all versions have a client example
63+
if test -f examples/client/main.rs; then
64+
cargo build --example client --features="client"
65+
fi
66+
# Not all versions have a server example
67+
if test -f examples/server/main.rs; then
68+
cargo build --example server --features="server"
69+
fi
70+
# Test the CLI works if present
71+
if test -f bin/cli.rs; then
72+
cargo build --bin ${package##*/} --features cli
73+
target/debug/${package##*/} --help
74+
fi
75+
cargo fmt
76+
cargo test
77+
cargo clippy
78+
cargo doc
79+
done

.github/workflows/samples-spring-jdk17.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
- samples/server/petstore/springboot-lombok-tostring
1111
- samples/server/petstore/springboot-file-delegate-optional
1212
- samples/server/petstore/springboot-petstore-with-api-response-examples
13+
- samples/server/petstore/spring-boot-oneof-sealed
1314
pull_request:
1415
paths:
1516
- samples/openapi3/client/petstore/spring-cloud-3-with-optional
@@ -19,6 +20,7 @@ on:
1920
- samples/server/petstore/springboot-lombok-tostring
2021
- samples/server/petstore/springboot-file-delegate-optional
2122
- samples/server/petstore/springboot-petstore-with-api-response-examples
23+
- samples/server/petstore/spring-boot-oneof-sealed
2224
jobs:
2325
build:
2426
name: Build Java Spring (JDK17)
@@ -36,6 +38,7 @@ jobs:
3638
- samples/server/petstore/springboot-lombok-tostring
3739
- samples/server/petstore/springboot-file-delegate-optional
3840
- samples/server/petstore/springboot-petstore-with-api-response-examples
41+
- samples/server/petstore/spring-boot-oneof-sealed
3942
steps:
4043
- uses: actions/checkout@v4
4144
- uses: actions/setup-java@v4

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ If you find OpenAPI Generator useful for work, please consider asking your compa
7676
[<img src="https://openapi-generator.tech/img/companies/clickit.jpg" width="128" height="128">](https://www.clickittech.com/?utm_source=openapi-generator&utm_medium=sponsorship&utm_campaign=oss-sponsorship)
7777
[<img src="https://openapi-generator.tech/img/companies/unified_to.jpg" width="128" height="128">](https://unified.to/?utm_source=openapi-generator&utm_medium=sponsorship&utm_campaign=oss-sponsorship)
7878
[<img src="https://openapi-generator.tech/img/companies/savetwt.jpg" width="128" height="128">](https://savetwt.com/?utm_source=openapi-generator&utm_medium=sponsorship&utm_campaign=oss-sponsorship)
79+
[<img src="https://openapi-generator.tech/img/companies/serpapi.png" width="128" height="128">](https://serpapi.com/?utm_source=openapi-generator&utm_medium=sponsorship&utm_campaign=oss-sponsorship)
7980

8081
#### Thank you GoDaddy for sponsoring the domain names, Linode for sponsoring the VPS, Checkly for sponsoring the API monitoring and Gradle for sponsoring Develocity
8182

@@ -91,7 +92,7 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se
9192
| | Languages/Frameworks |
9293
| -------------------------------- |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
9394
| **API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.1, .NET Core 3.1, .NET 5.0. Libraries: RestSharp, GenericHost, HttpClient), **C++** (Arduino, cpp-restsdk, Qt5, Tizen, Unreal Engine 4), **Clojure**, **Crystal**, **Dart**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Apache HttpClient 4.x, Apache HttpClient 5.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client, Spring 6 RestClient, MicroProfile Rest Client, Helidon), **Jetbrains HTTP Client**, **Julia**, **k6**, **Kotlin**, **Lua**, **N4JS**, **Nim**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types, Apollo GraphQL DataStore), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (hyper, reqwest, rust-server), **Scala** (akka, http4s, scalaz, sttp, swagger-async-httpclient, pekko), **Swift** (2.x, 3.x, 4.x, 5.x, 6.x), **Typescript** (AngularJS, Angular (9.x - 19.x), Aurelia, Axios, Fetch, Inversify, jQuery, Nestjs, Node, redux-query, Rxjs), **XoJo**, **Zapier** |
94-
| **Server stubs** | **Ada**, **C#** (ASP.NET Core, Azure Functions), **C++** (Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin, Echo), **Haskell** (Servant, Yesod), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, Jersey, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples), [Vert.x](https://vertx.io/), [Apache Camel](https://camel.apache.org/), [Helidon](https://helidon.io/)), **Julia**, **Kotlin** (Spring Boot, [Ktor](https://github.com/ktorio/ktor), [Vert.x](https://vertx.io/)), **PHP** ([Flight](https://docs.flightphp.com/), Laravel, Lumen, [Mezzio (fka Zend Expressive)](https://github.com/mezzio/mezzio), Slim, Silex, [Symfony](https://symfony.com/)), **Python** (FastAPI, Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** ([rust-server](https://openapi-generator.tech/docs/generators/rust-server/)), **Scala** (Akka, [Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), [Cask](https://github.com/com-lihaoyi/cask), Scalatra) |
95+
| **Server stubs** | **Ada**, **C#** (ASP.NET Core, Azure Functions), **C++** (Oat++, Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin, Echo), **Haskell** (Servant, Yesod), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, Jersey, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples), [Vert.x](https://vertx.io/), [Apache Camel](https://camel.apache.org/), [Helidon](https://helidon.io/)), **Julia**, **Kotlin** (Spring Boot, [Ktor](https://github.com/ktorio/ktor), [Vert.x](https://vertx.io/)), **PHP** ([Flight](https://docs.flightphp.com/), Laravel, Lumen, [Mezzio (fka Zend Expressive)](https://github.com/mezzio/mezzio), Slim, Silex, [Symfony](https://symfony.com/)), **Python** (FastAPI, Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** ([rust-server](https://openapi-generator.tech/docs/generators/rust-server/)), **Scala** (Akka, [Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), [Cask](https://github.com/com-lihaoyi/cask), Scalatra) |
9596
| **API documentation generators** | **HTML**, **Confluence Wiki**, **Asciidoc**, **Markdown**, **PlantUML** |
9697
| **Configuration files** | [**Apache2**](https://httpd.apache.org/) |
9798
| **Others** | **GraphQL**, **JMeter**, **Ktorm**, **MySQL Schema**, **Postman Collection**, **Protocol Buffer**, **WSDL** |
@@ -1127,6 +1128,7 @@ Here is a list of template creators:
11271128
* C# Azure functions: @Abrhm7786
11281129
* C# NancyFX: @mstefaniuk
11291130
* C++ (Qt5 QHttpEngine): @etherealjoy
1131+
* C++ Oat++: @Kraust
11301132
* C++ Pistache: @sebymiano
11311133
* C++ Restbed: @stkrwork
11321134
* Erlang Server: @galaxie @nelsonvides
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
generatorName: cpp-oatpp-server
2+
outputDir: samples/server/petstore/cpp-oatpp
3+
inputSpec: modules/openapi-generator/src/test/resources/3_0/cpp-oatpp-server/petstore.yaml
4+
templateDir: modules/openapi-generator/src/main/resources/cpp-oatpp-server
5+
additionalProperties:
6+
addExternalLibs: "true"

bin/configs/dart-dio-petstore-client-lib-fake-json_serializable.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
generatorName: dart-dio
22
outputDir: samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable
3-
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
3+
inputSpec: modules/openapi-generator/src/test/resources/3_0/dart/petstore-with-fake-endpoints-models-for-testing.yaml
44
templateDir: modules/openapi-generator/src/main/resources/dart/libraries/dio
55
typeMappings:
66
Client: "ModelClient"

bin/configs/dart-dio-petstore-client-lib-fake.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
generatorName: dart-dio
22
outputDir: samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake
3-
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
3+
inputSpec: modules/openapi-generator/src/test/resources/3_0/dart/petstore-with-fake-endpoints-models-for-testing.yaml
44
templateDir: modules/openapi-generator/src/main/resources/dart/libraries/dio
55
typeMappings:
66
Client: "ModelClient"

bin/configs/dart-petstore-client-lib-fake.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
generatorName: dart
22
outputDir: samples/openapi3/client/petstore/dart2/petstore_client_lib_fake
3-
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
3+
inputSpec: modules/openapi-generator/src/test/resources/3_0/dart/petstore-with-fake-endpoints-models-for-testing.yaml
44
templateDir: modules/openapi-generator/src/main/resources/dart2
55
typeMappings:
66
Client: "ModelClient"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
generatorName: java
2+
outputDir: samples/client/petstore/java/microprofile-rest-client-3.0-jackson-mutiny
3+
library: microprofile
4+
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
5+
templateDir: modules/openapi-generator/src/main/resources/Java
6+
additionalProperties:
7+
serializationLibrary: jackson
8+
artifactId: microprofile-rest-client-3-jackson-mutiny
9+
configKey: petstore
10+
microprofileRestClientVersion: "3.0"
11+
microprofileMutiny: true
12+
hideGenerationTimestamp: true

0 commit comments

Comments
 (0)