1
votes

I know that there is a way to generate the client-side code from the swagger yaml with swagger-codegen, but is there a way to generate the swagger yaml with the C++ annotations similar to what can be done in Java.

There seem to be annotation libraries available for other languages e.g python C# (https://swagger.io/blog/api-development/swagger-annotation-libraries/) but I am not able to find any support for C++.

1
@Helen I saw the post and there was no answer in that post. That is why I created this post. - Achint Mehta

1 Answers

1
votes

I don`t think so. 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

Update:

I'm not quite sure if oatpp-swagger can fit your requirements.