mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-06 04:20:11 +00:00
There is a lot of overlap on these models, to create a much more sensible design, a new 'base' package has been added which contains shared models that both versions make use of.
21 lines
466 B
Go
21 lines
466 B
Go
package base
|
|
|
|
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 {
|
|
x.Extensions = low.ExtractExtensions(root)
|
|
return nil
|
|
}
|