Sayi / swagger-dubbo

:page_with_curl: Dubbo的Swagger服务文档
Apache License 2.0
330 stars 186 forks source link

example访问地址 #4

Closed waterWang closed 6 years ago

waterWang commented 6 years ago

启动web容器,浏览器访问 http://ip:port/context/swagger-dubbo/swagger.json

我已经将example中的dubbo-provider.war 成功部署并且启动。访问http://localhost:8080/dubbo-provider/swagger-dubbo/swagger.json 都是一些json。

swagger页面的访问地址是什么呢???

Sayi commented 6 years ago

example中集成的SwaggerUI页面地址是: http://localhost:8080/dubbo-provider/distv2/index.html

进入页面输入框中输入你的swagger地址http://localhost:8080/dubbo-provider/swagger-dubbo/swagger.json 即可。

waterWang commented 6 years ago

谢谢您,看到效果。但是还有两个疑问:

  1. 接口中传递一个java bean对象,在swagger页面没有转成json?; 2.记得原来最早swagger只需要一个url(ip:port/content/swagger-ui.html)即可看到效果,即不需要再输入http://localhost:8080/dubbo-provider/swagger-dubbo/swagger.json
Sayi commented 6 years ago

1.这是个问题,没有对SwaggerUI进行改造,直接用的官方版本,官方版本是不支持请求参数的JSON可视化的,需要对SwaggerUI进行改造。

2.SwaggerUI现在的版本也可以不用再输入地址的,地址在dubbo-provider项目集成的swaggerUI里面配置:修改 swagger-dubbo-example/dubbo-provider/src/main/webapp/distv2/index.html