-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
62 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,15 +34,14 @@ func WithOptions(enable bool) Option { | |
// assets 资源基地址,apidoc 的浏览工具一般都是在一个 html 文件中引入一些依赖文件, | ||
// assets 就是这些依赖文件的基地址,可是指向一个 CDN 的地址,比如 swagger 的 | ||
// https://unpkg.com/[email protected]; | ||
// favicon 图标,请使用 icon 或是 png 这种大部分浏览器都支持的图标格式, | ||
// 可以为空。尽量提供比较大的图标,可能会被用在除 favicon 之外的地方; | ||
// logo LOGO 图标,可能还会被用于 favicon 等功能,请确保格式能被正确处理,可以为空; | ||
// | ||
// NOTE: [github.com/issue9/webuse/openapi] 下实现了部分简单的模板。 | ||
func WithHTML(tpl, assets, favicon string) Option { | ||
func WithHTML(tpl, assets, logo string) Option { | ||
return func(d *Document) { | ||
d.templateName = tpl | ||
d.assetsURL = assets | ||
d.favicon = favicon | ||
d.logo = logo | ||
} | ||
} | ||
|
||
|
@@ -148,7 +147,7 @@ func WithCookie(global bool, p ...*Parameter) Option { | |
} | ||
} | ||
|
||
// WithQuery 向 components/paramters 添加 InQuery 的对象 | ||
// WithQuery 向 components/parameters 添加 InQuery 的对象 | ||
// | ||
// p 要求必须指定 Ref.Ref。其它接口可以通过 ref 引用此对象。 | ||
// | ||
|
@@ -164,7 +163,7 @@ func WithQuery(p ...*Parameter) Option { | |
} | ||
} | ||
|
||
// WithPath 向 components/paramters 添加 InPath 的对象 | ||
// WithPath 向 components/parameters 添加 InPath 的对象 | ||
// | ||
// p 要求必须指定 Ref.Ref。其它接口可以通过 ref 引用此对象。 | ||
// | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters