save code
This commit is contained in:
22
define/generate.go
Normal file
22
define/generate.go
Normal file
@ -0,0 +1,22 @@
|
||||
// Package define ...
|
||||
//
|
||||
// Description : define ...
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 2024-08-14 15:20
|
||||
package define
|
||||
|
||||
// UriBaseConfig 添加接口时的基础配置
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 15:21 2024/8/14
|
||||
type UriBaseConfig struct {
|
||||
Uri string `json:"uri"` // 接口路由
|
||||
Method string `json:"method"` // 接口请求方法
|
||||
ContentType string `json:"content_type"` // 接口请求类型
|
||||
TagList []string `json:"tag_list"` // 接口标签列表
|
||||
Summary string `json:"summary"` // 接口摘要描述
|
||||
Description string `json:"description"` // 接口详细描述
|
||||
}
|
@ -79,7 +79,7 @@ type PathItemOperationConfig struct {
|
||||
Responses map[string]*Response `json:"responses"` // 描述一个操作可能发生的响应的响应码与响应包含的响应体的对象。default字段可以用来标记一个响应适用于其他未被规范明确定义的HTTP响应码的默认响应。一个Responses 对象必须至少包含一个响应码,而且是成功的响应。
|
||||
Callbacks map[string]any `json:"callbacks,omitempty"` // 一组相对于父操作的可能出现的回调映射,映射中的每一个键都唯一的映射一个 Callback 对象
|
||||
Deprecated bool `json:"deprecated"` // 声明此操作已经被废弃,使用者应该尽量避免使用此操作,默认的值是 false。
|
||||
Security any `json:"security.o,omitempty"` // 声明那种安全机制可用于此操作。这个列表可以包含多种可用于此操作的安全需求对象,但是在认证一个请求时应该仅使用其中一种。这里的定义会覆盖任何在顶层 security 中的安全声明,因此可以声明一个空数组来变相的移除顶层的安全声明。
|
||||
Security any `json:"security,omitempty"` // 声明那种安全机制可用于此操作。这个列表可以包含多种可用于此操作的安全需求对象,但是在认证一个请求时应该仅使用其中一种。这里的定义会覆盖任何在顶层 security 中的安全声明,因此可以声明一个空数组来变相的移除顶层的安全声明。
|
||||
Servers []*ServerItem `json:"servers,omitempty"` // 一个可用于此操作的额外的 server 数组,这里的定义会覆盖 Path Item 对象 或 顶层的定义。
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user