Skip to content

Commit 4e9c92e

Browse files
committed
add changes for cpp-httplib-server with samples
1 parent bdfbb32 commit 4e9c92e

52 files changed

Lines changed: 8045 additions & 8 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Samples cpp httplib server
2+
3+
on:
4+
push:
5+
branches:
6+
- "samples/server/petstore/cpp-httplib-server/**"
7+
pull_request:
8+
paths:
9+
- "samples/server/petstore/cpp-httplib-server/**"
10+
11+
env:
12+
GRADLE_VERSION: 6.9
13+
14+
jobs:
15+
build:
16+
name: Build cpp httplib server
17+
strategy:
18+
matrix:
19+
sample:
20+
- samples/server/petstore/cpp-httplib-server
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: Install dependencies (Linux)
29+
if: matrix.os == 'ubuntu-latest'
30+
run: |
31+
sudo apt-get update
32+
sudo apt-get install -y nlohmann-json3-dev libssl-dev zlib1g-dev
33+
# Install httplib from source since it's not in Ubuntu repos
34+
git clone https://github.com/yhirose/cpp-httplib.git
35+
cd cpp-httplib
36+
mkdir build && cd build
37+
cmake .. -DCMAKE_BUILD_TYPE=Release
38+
make -j$(nproc)
39+
sudo make install
40+
- name: Install dependencies (macOS)
41+
if: matrix.os == 'macOS-latest'
42+
run: |
43+
brew install nlohmann-json openssl zlib
44+
# Install httplib via Homebrew
45+
brew install cpp-httplib
46+
- name: Install vcpkg (Windows)
47+
if: matrix.os == 'windows-latest'
48+
run: |
49+
git clone https://github.com/microsoft/vcpkg.git
50+
.\vcpkg\bootstrap-vcpkg.bat
51+
shell: cmd
52+
- name: Install dependencies (Windows)
53+
if: matrix.os == 'windows-latest'
54+
run: |
55+
.\vcpkg\vcpkg.exe install nlohmann-json:x64-windows openssl:x64-windows cpp-httplib:x64-windows zlib:x64-windows
56+
shell: cmd
57+
- name: Build
58+
working-directory: ${{ matrix.sample }}
59+
run: cmake -B build && cmake --build build --verbose
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
generatorName: cpp-httplib-server
2+
outputDir: samples/server/petstore/cpp-httplib-server
3+
inputSpec: modules/openapi-generator/src/test/resources/3_0/cpp-httplib-server/petstore.yaml
4+
templateDir: modules/openapi-generator/src/main/resources/cpp-httplib-server
5+
additionalProperties:
6+
apiNamespace: "petstore::openapi::api"
7+
modelNamespace: "petstore::openapi::model"
8+
projectName: "petStoreProject"
9+
addApiImplStubs: true

docs/generators.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ The following generators are available:
1212
* [bash](generators/bash.md)
1313
* [c](generators/c.md)
1414
* [clojure](generators/clojure.md)
15-
* [cpp-oatpp-client](generators/cpp-oatpp-client.md)
1615
* [cpp-qt-client](generators/cpp-qt-client.md)
1716
* [cpp-restsdk](generators/cpp-restsdk.md)
1817
* [cpp-tiny (beta)](generators/cpp-tiny.md)
@@ -65,11 +64,10 @@ The following generators are available:
6564
* [scala-pekko](generators/scala-pekko.md)
6665
* [scala-sttp](generators/scala-sttp.md)
6766
* [scala-sttp4 (beta)](generators/scala-sttp4.md)
68-
* [scala-sttp4-jsoniter (beta)](generators/scala-sttp4-jsoniter.md)
6967
* [scalaz](generators/scalaz.md)
7068
* [swift-combine](generators/swift-combine.md)
7169
* [swift5](generators/swift5.md)
72-
* [swift6](generators/swift6.md)
70+
* [swift6 (beta)](generators/swift6.md)
7371
* [typescript (experimental)](generators/typescript.md)
7472
* [typescript-angular](generators/typescript-angular.md)
7573
* [typescript-aurelia](generators/typescript-aurelia.md)
@@ -154,7 +152,6 @@ The following generators are available:
154152
* [scala-play-server](generators/scala-play-server.md)
155153
* [scalatra](generators/scalatra.md)
156154
* [spring](generators/spring.md)
157-
* [typescript-nestjs-server (beta)](generators/typescript-nestjs-server.md)
158155

159156

160157
## DOCUMENTATION generators

0 commit comments

Comments
 (0)