generate java google endpoints server stub from swagger API

随声附和 提交于 2019-12-02 06:17:49

问题


I'm looking for a way to generate a server stub for a java google endpoints backend project from a swagger API (yaml/json file).

Any suggestions?

Cheers, Asaf


回答1:


The easiest way is to import your Swagger/OpenAPI spec into https://editor.swagger.io and in the top menu bar click on "Generate Server" and then select Java-related server stub (e.g. JAX-RS, Spring and more)

Or you can install Swagger Codegen locally. Here is a good starting point:

https://github.com/swagger-api/swagger-codegen#getting-started




回答2:


You should explore swagger code-gen.

https://github.com/swagger-api/swagger-codegen#to-generate-a-sample-client-library

You can also explore Restlet studio : https://studio.restlet.com/apis/local/info (Server-skeletons and choose).

hope it helps



来源:https://stackoverflow.com/questions/38846198/generate-java-google-endpoints-server-stub-from-swagger-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!