Documentation
¶
Index ¶
- func LoadSpecFromBytes(filename string, data []byte) (map[string]interface{}, error)
- func LoadSpecFromFile(filePath string) (map[string]interface{}, error)
- func LoadSpecFromPath(path string) (map[string]interface{}, error)
- func LoadSpecFromURL(client *http.Client, url string) (map[string]interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadSpecFromBytes ¶
LoadSpecFromBytes 从字节流加载 Swagger 规范,根据文件名扩展名自动检测 JSON/YAML 格式 当扩展名无法识别时,依次尝试 JSON 和 YAML 反序列化
func LoadSpecFromFile ¶
LoadSpecFromFile 从文件加载 Swagger 规范(支持 JSON 和 YAML 格式)
func LoadSpecFromPath ¶
LoadSpecFromPath 从指定路径加载规范文件,根据扩展名自动检测格式 与 LoadSpecFromFile 不同,此方法支持无扩展名时的自动检测回退
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.