mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-09 20:47:44 +00:00
25 lines
528 B
Go
25 lines
528 B
Go
package v3
|
|
|
|
import (
|
|
"github.com/pb33f/libopenapi/datamodel/low"
|
|
"gopkg.in/yaml.v3"
|
|
)
|
|
|
|
type XML struct {
|
|
Name low.NodeReference[string]
|
|
Namespace low.NodeReference[string]
|
|
Prefix low.NodeReference[string]
|
|
Attribute low.NodeReference[bool]
|
|
Wrapped low.NodeReference[bool]
|
|
Extensions map[low.KeyReference[string]]low.ValueReference[any]
|
|
}
|
|
|
|
func (x *XML) Build(root *yaml.Node) error {
|
|
extensionMap, err := ExtractExtensions(root)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
x.Extensions = extensionMap
|
|
return nil
|
|
}
|