swagger-api/swagger-codegen

Use Swagger-Annotated Code As Input To swagger-codegen

Open

#5.694 geöffnet am 23. Mai 2017

Auf GitHub ansehen
 (5 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)HTML (5.474 Forks)batch import
Enhancement: FeatureGeneral: Suggestionhelp wanted

Repository-Metriken

Stars
 (12.701 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Description

Feature Request: Enable swagger-codegen to generate a client API by inspecting a service's JAR/WAR for Swagger annotations. As a RESTful service developer, I want to be able to generate and publish client JARs for my service as part of that service's build process. This will enable other developers to more easily integrate with my service. To accomplish this, I need to run swagger-codegen before the service is deployed and swagger.json is generated. I think the best approach is to have swagger-codegen inspect either my source files or compiled class files and use them as input.

Suggest a Fix

I have developed a Maven plugin that will scan a JAR file for Swagger annotations, generate swagger.json based on those annotations, then call swagger-codegen to generate a client API from the swagger.json. I was planning to release the plugin as a standalone OSS project, but then I thought it might make sense to contribute it as a new feature to this project.

Contributor Guide