-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sample using Swagger #158
Comments
@loxal I have added the initial implementation of a swagger codegen generator for ktor servers at swagger-api/swagger-codegen#7412. If you have some time to review it (even if just the generated outputs), I'd appreciate it any feedback. |
@jimschubert implemented something for generating ktor server stubs out of existing swagger definition, right? And @loxal asking for generating swagger from an existing ktor server. |
Yes, I've setup a server stub generator for ktor. I've since moved from swagger-codegen to a community driven fork: https://github.com/OpenAPITools/openapi-generator Our fork supports all generators using OpenAPI 2 and 3.x specs, while swagger-codegen doesn't. We've also had some contributions to the ktor generator in our fork. Please check it out and open any issues you find. This is spec -> API and not the other way around. |
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks. |
I'll happy to provide an example of swagger integration. |
@allevo so please do it :) |
Duplicated by https://youtrack.jetbrains.com/issue/KTOR-774. Currently WIP |
Would be nice to have a sample with Swagger integration. Especially I am interested whether Swagger could work with Ktor like with Spring Boot and automatically generate the API using reflection, i.e. generate a Swagger console that reflects the API of the implementation.
Generating code from Swagger specification is another pattern but one that usually does not work in practice beyond "Hello, World!".
Enable Ktor services to expose something like http://petstore.swagger.io, to communicate their APIs would be a key asset to Ktor.
The text was updated successfully, but these errors were encountered: