mirror of
https://gitee.com/johng/gf.git
synced 2024-12-02 12:17:53 +08:00
23 lines
619 B
Go
23 lines
619 B
Go
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
|
|
//
|
|
// This Source Code Form is subject to the terms of the MIT License.
|
|
// If a copy of the MIT was not distributed with this file,
|
|
// You can obtain one at https://github.com/gogf/gf.
|
|
|
|
package goai
|
|
|
|
import (
|
|
"github.com/gogf/gf/v2/text/gstr"
|
|
)
|
|
|
|
// XExtensions stores the `x-` custom extensions.
|
|
type XExtensions map[string]interface{}
|
|
|
|
func (oai *OpenApiV3) tagMapToXExtensions(tagMap map[string]string, extensions XExtensions) {
|
|
for k, v := range tagMap {
|
|
if gstr.HasPrefix(k, "x-") || gstr.HasPrefix(k, "X-") {
|
|
extensions[k] = v
|
|
}
|
|
}
|
|
}
|