Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/samples-cpp-httplib-server.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Samples cpp httplib server

on:
push:
branches:
- "samples/server/petstore/cpp-httplib-server/**"
pull_request:
paths:
- "samples/server/petstore/cpp-httplib-server/**"

env:
GRADLE_VERSION: 6.9

jobs:
build:
name: Build cpp httplib server
strategy:
matrix:
sample:
- samples/server/petstore/cpp-httplib-server
os:
- ubuntu-latest
- macOS-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install dependencies (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y nlohmann-json3-dev libssl-dev zlib1g-dev
# Install httplib from source since it's not in Ubuntu repos
git clone https://github.com/yhirose/cpp-httplib.git
cd cpp-httplib
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j$(nproc)
sudo make install
- name: Install dependencies (macOS)
if: matrix.os == 'macOS-latest'
run: |
brew install nlohmann-json openssl zlib
# Install httplib via Homebrew
brew install cpp-httplib
- name: Install vcpkg (Windows)
if: matrix.os == 'windows-latest'
run: |
git clone https://github.com/microsoft/vcpkg.git
.\vcpkg\bootstrap-vcpkg.bat
shell: cmd
- name: Install dependencies (Windows)
if: matrix.os == 'windows-latest'
run: |
.\vcpkg\vcpkg.exe install nlohmann-json:x64-windows openssl:x64-windows cpp-httplib:x64-windows zlib:x64-windows
shell: cmd
- name: Build
working-directory: ${{ matrix.sample }}
run: cmake -B build && cmake --build build --verbose
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se
| | Languages/Frameworks |
| -------------------------------- |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **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** |
| **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) |
| **Server stubs** | **Ada**, **C#** (ASP.NET Core, Azure Functions), **C++** (Oat++, Pistache, Restbed, Qt5 QHTTPEngine, Httplib), **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) |
| **API documentation generators** | **HTML**, **Confluence Wiki**, **Asciidoc**, **Markdown**, **PlantUML** |
| **Configuration files** | [**Apache2**](https://httpd.apache.org/) |
| **Others** | **GraphQL**, **JMeter**, **Ktorm**, **MySQL Schema**, **Postman Collection**, **Protocol Buffer**, **WSDL** |
Expand Down
8 changes: 8 additions & 0 deletions bin/configs/cpp-httplib-petstore.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
generatorName: cpp-httplib-server
outputDir: samples/server/petstore/cpp-httplib-server
inputSpec: modules/openapi-generator/src/test/resources/3_0/cpp-httplib-server/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/cpp-httplib-server
additionalProperties:
apiNamespace: "sample::openapi::api"
modelNamespace: "sample::openapi::model"
projectName: "SampleProject"
3 changes: 2 additions & 1 deletion docs/generators.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ The following generators are available:
* [cpp-pistache-server](generators/cpp-pistache-server.md)
* [cpp-qt-qhttpengine-server](generators/cpp-qt-qhttpengine-server.md)
* [cpp-restbed-server](generators/cpp-restbed-server.md)
* [cpp-restbed-server-deprecated](generators/cpp-restbed-server-deprecated.md)
* [cpp-restbed-server-deprecated](generators/cpp-restbed-server-deprecated.md)
* [cpp-httplib-server](generators/cpp-httplib-server.md)
* [csharp-functions](generators/csharp-functions.md)
* [erlang-server](generators/erlang-server.md)
* [erlang-server-deprecated (deprecated)](generators/erlang-server-deprecated.md)
Expand Down
1 change: 1 addition & 0 deletions docs/generators/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ The following generators are available:
* [cpp-pistache-server](cpp-pistache-server.md)
* [cpp-qt5-qhttpengine-server](cpp-qt5-qhttpengine-server.md)
* [cpp-restbed-server](cpp-restbed-server.md)
* [cpp-httplib-server](cpp-httplib-server.md)
* [erlang-server](erlang-server.md)
* [fsharp-functions (beta)](fsharp-functions.md)
* [fsharp-giraffe-server (beta)](fsharp-giraffe-server.md)
Expand Down
Loading
Loading