Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to generate a swagger specification file from C++ code?

I've a requirement to create a HTTP API layer over a legacy API interface written in C++. My plan is to generate the Swagger or open API file and then make it available to bunch of projects that needs to write a client (who will be consumer of new API) or a server (wrapper to legacy API).

Is there anything that can expedite this requirement (other than manually parsing them and creating swagger spec file)? i.e. using C++ code to generate swagger JSON/YML file

like image 726
mahesh kamath Avatar asked Dec 10 '18 03:12

mahesh kamath


Video Answer


1 Answers

Quite late answer and I think that with no good news.

If you're talking about the implementation of Annotations in C++. As far as I know the Swagger Core Annotations are part of the Swagger Core Project, and in the documentation you can find:

Swagger Core is a Java implementation of the OpenAPI Specification. Current version supports JAX-RS2.

Also the Prerequisites says:

You need the following installed and available in your $PATH:

  • Java 8
  • Apache maven 3.0.4 or greater
  • Jackson 2.4.5 or greater
like image 58
juanlumn Avatar answered Sep 28 '22 00:09

juanlumn