api接口创建有导入和手工录入两种
手工
导出Download
导入import
点级import def
点及import
也可以从url导入
如果是header需要配置cors
然后发布或者重新发布
查询文档:
点左边的documnet
再点view documnet
测试
swag编写
// @Summary Int64 // @Description 文件服务 // @Tags Int64 // @Produce json // @Accept json // @Param X-Session-Token header string true "X-Session-Tiken" // @Success 200 {object} basedto.IchubResult "成功" // @Failure 400 {object} string "请求错误" // @Failure 500 {object} string "内部错误" // @Router /int64 [post] func (this *Int64FuncService) Execute(ctx *gin.Context) { var xtoken = ctx.GetHeader("X-Session-Token")