i'm trying to use swagger-codegen-maven-plugin to generate my interface . after compiling with the plugin - it generates all the files correctly but for some reason the interface name is DefaultApi.
i looked for some configuration that i can change the name of the interface that been generated but didnt find the solution for that.
any idea on that??
Swagger Codegen is available for download in the GitHub repository, or can be generated for any new or existing OpenAPI-defined API in the integrated SwaggerHub platform.
The Swagger Codegen is an open source code-generator to build server stubs and client SDKs directly from a Swagger defined RESTful API. The source code for the Swagger Codegen can be found in GitHub. GitHub: https://github.com/swagger-api/swagger-codegen.
"DefaultApi" is used when there's no tags
specified for the endpoint.
For example, this endpoint will be put in a class named "UserApi" since the tags
is set to User
.
You will need to update the spec to include proper tags
for endpoints to avoid using "DefaultApi"
UPDATE: On May 2018, about 50 top contributors and template creators of Swagger Codegen decided to fork Swagger Codegen to maintain a community-driven version called OpenAPI Generator. Please refer to the Q&A for more information.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With