mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-10 04:20:24 +00:00
Most of the core functions are now in place
The hardest part has come and gone! it's all downhill now.
This commit is contained in:
@@ -17,7 +17,18 @@ type Encoding struct {
|
||||
AllowReserved low.NodeReference[bool]
|
||||
}
|
||||
|
||||
func (en Encoding) Build(root *yaml.Node) error {
|
||||
func (en *Encoding) FindHeader(hType string) *low.ValueReference[*Header] {
|
||||
for _, c := range en.Headers {
|
||||
for n, o := range c {
|
||||
if n.Value == hType {
|
||||
return &o
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (en *Encoding) Build(root *yaml.Node) error {
|
||||
|
||||
headers, err := ExtractMap[*Header](HeadersLabel, root)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user