Open michsco opened 4 years ago
@RicoSuter — my team is open to contributing towards this.
Please see a similar reply here : https://github.com/RicoSuter/NSwag/issues/2962#issuecomment-660684485
Creating is a thing, but maintaining takes way more time.
I've not touched C++ for a long time, but what's the story for http requests / json handling in C++? Is there any "standard" library for doing these things or would there be 100 flavors of C++ clients/contracts ?
Obviously C++ doesn't have a standard library for those things like C# or TypeScript, but I think there's a way to make it work if consumers are required to implement two *.dotliquid
templates to do the actual serialization and HTTP request send/receive. All of the pieces of interpreting swagger, expected response codes, etc., can all be a standard set of code.
FYI. OpenAPI Generator comes with a C++ (cpprestsdk) client generator. My teammates are using it and the overall experience is not bad so far.
Also welcome another generator in NSWag to support C++.
Have you ever considered extending this project to also generate C++ contracts and client? We use NSwag for both C# and TypeScript and it works extremely well. I realize that C++ is a much harder problem, but it seems like it can be done with some of the dotliquid templates.