docs/web/api-document-openapiv3 #43
Replies: 6 comments 4 replies
-
|
validation rules 加上max min length 规则就好了,现在只有required 是用上,希望加上这样前端看文档就可以直接写自己的校验规则方便很多。 |
Beta Was this translation helpful? Give feedback.
-
|
Schema 对象下的字段如何通过struct tag配置,比如想要配置Schema下的enum这个字段 type XxREq struct {
Type string `json:"type" dc:"类型" schema:"???"`
} |
Beta Was this translation helpful? Give feedback.
-
|
想给 responses.200.content.application/json.schema 添加 ref,以及 data field 添加 ref,这种风格上的改动可以接受吗?。因为其他同事根据openapi 直接生成其他语言的调用代码,这个两个有 ref 会更好。可以的话,我提个 pr。 |
Beta Was this translation helpful? Give feedback.
-
|
您好,我想了解一下这个openapi有办法只暴露指定前缀的接口吗,比如我的服务包含/api/v1/admin和/api/v1/user两个前缀的路由,我只想将/api/v1/user/这个前缀的路由接口生成openapi.json来提供用户访问和请求,但目前我发现生成的openapi.json是包含全部的路由,如果要实现这个效果是只能自己编辑openapi.json进行配置了吗,还是配置文件有方法控制呢? |
Beta Was this translation helpful? Give feedback.
-
|
tags怎么设定多个,达到分层效果? |
Beta Was this translation helpful? Give feedback.
-
此处$ref 生成有点问题 swagger UI官方提示报错 说不应该有[] 应该是url encode之后的结果 |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
docs/web/api-document-openapiv3
本文档介绍了如何在GoFrame框架中使用OpenAPIv3协议来规范接口文档的生成。通过嵌入g.Meta元数据结构体,可以自动生成包含协议标签的接口信息。此外,文中还展示了如何自定义扩展标签和手动完善接口文档。
https://goframe.org/docs/web/api-document-openapiv3
Beta Was this translation helpful? Give feedback.
All reactions