mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-09 20:47:44 +00:00
We-worked model to remove resolver.
lookups are performed inline now. keeps things simpler, however it has a performance knock, so it's time to refine async building were possible.
This commit is contained in:
@@ -2,6 +2,7 @@ package v3
|
||||
|
||||
import (
|
||||
"github.com/pb33f/libopenapi/datamodel/low"
|
||||
"github.com/pb33f/libopenapi/index"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
@@ -21,9 +22,9 @@ func (en *Encoding) FindHeader(hType string) *low.ValueReference[*Header] {
|
||||
return FindItemInMap[*Header](hType, en.Headers.Value)
|
||||
}
|
||||
|
||||
func (en *Encoding) Build(root *yaml.Node) error {
|
||||
func (en *Encoding) Build(root *yaml.Node, idx *index.SpecIndex) error {
|
||||
|
||||
headers, hL, hN, err := ExtractMapFlat[*Header](HeadersLabel, root)
|
||||
headers, hL, hN, err := ExtractMapFlat[*Header](HeadersLabel, root, idx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user