使用Swagger生成Spring Boot REST客戶端(支持Feign)(待實踐)

若是項目上使用了Swagger作RESTful的文檔,那麼也能夠經過Swagger提供的代碼生成器生成客戶端代碼,同時支持Feign客戶端。git

可是通過測試,生成Feign代碼和REST客戶端有些臃腫。github

官方網站:https://github.com/swagger-api/swagger-codegenspring

 

參考:api

https://stackoverflow.com/questions/46019180/how-to-generate-spring-cloud-feign-client-using-swagger-codegen-maven-pluginmaven

https://stackoverflow.com/questions/45592746/how-to-generate-uri-parameter-for-dynamic-feign-basepath-using-swagger-codegenspring-boot

http://www.baeldung.com/spring-boot-rest-client-swagger-codegen測試

相關文章
相關標籤/搜索