How to generate java client code for swagger REST API documentation

后端 未结 6 520
谎友^
谎友^ 2020-12-05 09:58

My scenario is the following.

I have a swagger .json eg.: http://petstore.swagger.io/v2/swagger.json I want to use a generated java client for the REST API above, li

6条回答
  •  时光说笑
    2020-12-05 10:56

    I think that you don't use the right value for the parameter -l of Swagger Codegen (you use spring-mvc which is a server-side technology). You could try to use the value java.

    You could also notice that there is a tool, the Restlet Studio, that allows to generate code from Swagger content. For Java, it mainly relies on the Restlet framework but I think that it could suit your needs.

    Hope it helps you, Thierry

提交回复
热议问题