swagger-api

module
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2021 License: MIT

README

swagger-api

Quick Start

在项目中引入openapiv2

import	"github.com/go-kratos/swagger-api/openapiv2"

h := openapiv2.NewHandler()
//将/q/路由放在最前匹配
httpSrv.HandlePrefix("/q/", h)

启动应用后,在浏览器中输入 http://<ip>:<port>/q/services,找到需要渲染的<package_name>.<service_name> Alt text 在浏览器中输入http://<ip>:<port>/q/swagger-ui/ (注意结尾有斜杠/),同时在Swagger ui界面的Explore栏目中输入http://<ip>:<port>/q/service/<package_name>.<service_name>并点击Explore Alt text

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL