Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cpp-oatpp-server generator (alpha) #7903

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wing328
Copy link
Member

@wing328 wing328 commented Nov 9, 2020

To build the new generator cpp-oatpp-server:
(ref: https://github.com/oatpp/oatpp)

git clone https://github.com/OpenAPITools/openapi-generator/
cd openapi-generator
git checkout cpp-oatpp-server-generator

Linux: ./mvnw clean package -DskipTests
Windows: .\mvnw.bat clean package -DskipTests

java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g cpp-oatpp-server -i https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml -t modules/openapi-generator/src/main/resources/cpp-oatpp-server -o /var/tmp/cpp-oatpp-server

The new generator is created based on cpp-pistache-server. To start with, we'll need to update the mustache templates to use oatpp. Templates can be found in modules/openapi-generator/src/main/resources/cpp-oatpp-server

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • If contributing template-only or documentation-only changes which will change sample output, build the project beforehand.
  • Run the shell script ./bin/generate-samples.shto update all Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master. These must match the expectations made by your contribution. You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*. For Windows users, please run the script in Git BASH.
  • File the PR against the correct branch: master
  • Copy the technical committee to review the pull request if your PR is targeting a particular programming language.

@wing328 wing328 added this to the 5.0.0 milestone Nov 9, 2020
@wing328 wing328 modified the milestones: 5.0.0, 5.0.1 Dec 21, 2020
@wing328 wing328 modified the milestones: 5.0.1, 5.1.0 Feb 8, 2021
@wing328 wing328 removed this from the 5.1.0 milestone Mar 19, 2021
@Crisliu7
Copy link

Hi William, thanks for your effort to create this. May I ask is this generator stable to use? Any plan to merge it to master branch or release it?

@wing328
Copy link
Member Author

wing328 commented Jul 24, 2022

@Crisliu7 I've not seen any contributions to this generator so far. Would you have time to contribute to this PR to make the output works (at least with basic APIs like petstore that we use for testing in this project)?

@makru86
Copy link

makru86 commented Mar 26, 2023

I plan to work on it, to create cpp-oatpp-server generator. But I will start from scratch, new.sh -n cpp-oatpp -s -t. Will post updates in this thread.

https://github.com/atokama/openapi-generator

@makru86
Copy link

makru86 commented Mar 27, 2023

preparing hand-written oatpp-petstore-server https://github.com/atokama/oatpp-petstore-server

i plan to use async endpoints, to enable non-blocking IO in handlers. https://oatpp.io/docs/oatpp-coroutines/

@makru86
Copy link

makru86 commented Apr 12, 2023

continue work here https://github.com/makru86/oatpp-petstore

@makru86
Copy link

makru86 commented Jun 24, 2023

I manually created Petstore API with C++ and Oat++.

Anyone welcome to use it as a reference for a cpp-oatpp-server generator.

https://github.com/makru86/oatpp-petstore-starter
Ref ticket @oatpp repo: oatpp/oatpp#331

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants