diff --git a/datamodel/high/base/schema_proxy.go b/datamodel/high/base/schema_proxy.go index 88f7cb5..4c630d5 100644 --- a/datamodel/high/base/schema_proxy.go +++ b/datamodel/high/base/schema_proxy.go @@ -120,6 +120,13 @@ func (sp *SchemaProxy) GetReference() string { return sp.schema.GetValue().GetReference() } +func (sp *SchemaProxy) GetSchemaKeyNode() *yaml.Node { + if sp.schema != nil { + return sp.GoLow().GetKeyNode() + } + return nil +} + func (sp *SchemaProxy) GetReferenceNode() *yaml.Node { if sp.refStr != "" { return utils.CreateRefNode(sp.refStr) diff --git a/datamodel/low/base/contact.go b/datamodel/low/base/contact.go index c895820..5ee0c86 100644 --- a/datamodel/low/base/contact.go +++ b/datamodel/low/base/contact.go @@ -17,14 +17,16 @@ import ( // v2 - https://swagger.io/specification/v2/#contactObject // v3 - https://spec.openapis.org/oas/v3.1.0#contact-object type Contact struct { - Name low.NodeReference[string] - URL low.NodeReference[string] - Email low.NodeReference[string] + Name low.NodeReference[string] + URL low.NodeReference[string] + Email low.NodeReference[string] + KeyNode *yaml.Node *low.Reference } // Build is not implemented for Contact (there is nothing to build). -func (c *Contact) Build(_ context.Context, _, _ *yaml.Node, _ *index.SpecIndex) error { +func (c *Contact) Build(_ context.Context, keyNode, _ *yaml.Node, _ *index.SpecIndex) error { + c.KeyNode = keyNode c.Reference = new(low.Reference) // not implemented. return nil diff --git a/datamodel/low/base/example.go b/datamodel/low/base/example.go index cf26d53..3a22f87 100644 --- a/datamodel/low/base/example.go +++ b/datamodel/low/base/example.go @@ -25,6 +25,7 @@ type Example struct { Value low.NodeReference[*yaml.Node] ExternalValue low.NodeReference[string] Extensions *orderedmap.Map[low.KeyReference[string], low.ValueReference[*yaml.Node]] + KeyNode *yaml.Node *low.Reference } @@ -55,7 +56,8 @@ func (ex *Example) Hash() [32]byte { } // Build extracts extensions and example value -func (ex *Example) Build(_ context.Context, _, root *yaml.Node, _ *index.SpecIndex) error { +func (ex *Example) Build(_ context.Context, keyNode, root *yaml.Node, _ *index.SpecIndex) error { + ex.KeyNode = keyNode root = utils.NodeAlias(root) utils.CheckForMergeNodes(root) ex.Reference = new(low.Reference) diff --git a/datamodel/low/base/external_doc.go b/datamodel/low/base/external_doc.go index a746e6c..8dacac6 100644 --- a/datamodel/low/base/external_doc.go +++ b/datamodel/low/base/external_doc.go @@ -25,6 +25,7 @@ type ExternalDoc struct { Description low.NodeReference[string] URL low.NodeReference[string] Extensions *orderedmap.Map[low.KeyReference[string], low.ValueReference[*yaml.Node]] + KeyNode *yaml.Node *low.Reference } @@ -34,7 +35,8 @@ func (ex *ExternalDoc) FindExtension(ext string) *low.ValueReference[*yaml.Node] } // Build will extract extensions from the ExternalDoc instance. -func (ex *ExternalDoc) Build(_ context.Context, _, root *yaml.Node, idx *index.SpecIndex) error { +func (ex *ExternalDoc) Build(_ context.Context, keyNode, root *yaml.Node, idx *index.SpecIndex) error { + ex.KeyNode = keyNode root = utils.NodeAlias(root) utils.CheckForMergeNodes(root) ex.Reference = new(low.Reference) diff --git a/datamodel/low/base/info.go b/datamodel/low/base/info.go index fb75b9a..6267cee 100644 --- a/datamodel/low/base/info.go +++ b/datamodel/low/base/info.go @@ -32,6 +32,7 @@ type Info struct { License low.NodeReference[*License] Version low.NodeReference[string] Extensions *orderedmap.Map[low.KeyReference[string], low.ValueReference[*yaml.Node]] + KeyNode *yaml.Node *low.Reference } @@ -46,7 +47,8 @@ func (i *Info) GetExtensions() *orderedmap.Map[low.KeyReference[string], low.Val } // Build will extract out the Contact and Info objects from the supplied root node. -func (i *Info) Build(ctx context.Context, _, root *yaml.Node, idx *index.SpecIndex) error { +func (i *Info) Build(ctx context.Context, keyNode, root *yaml.Node, idx *index.SpecIndex) error { + i.KeyNode = keyNode root = utils.NodeAlias(root) utils.CheckForMergeNodes(root) i.Reference = new(low.Reference) diff --git a/datamodel/low/base/license.go b/datamodel/low/base/license.go index aa5903b..4710a64 100644 --- a/datamodel/low/base/license.go +++ b/datamodel/low/base/license.go @@ -22,11 +22,13 @@ type License struct { Name low.NodeReference[string] URL low.NodeReference[string] Identifier low.NodeReference[string] + KeyNode *yaml.Node *low.Reference } // Build out a license, complain if both a URL and identifier are present as they are mutually exclusive -func (l *License) Build(ctx context.Context, _, root *yaml.Node, idx *index.SpecIndex) error { +func (l *License) Build(ctx context.Context, keyNode, root *yaml.Node, idx *index.SpecIndex) error { + l.KeyNode = keyNode root = utils.NodeAlias(root) utils.CheckForMergeNodes(root) l.Reference = new(low.Reference) diff --git a/datamodel/low/base/schema.go b/datamodel/low/base/schema.go index 0062832..9fdcd08 100644 --- a/datamodel/low/base/schema.go +++ b/datamodel/low/base/schema.go @@ -1188,7 +1188,8 @@ func buildSchema(ctx context.Context, schemas chan schemaProxyBuildResult, label } } } else { - errors <- fmt.Errorf("build schema failed: unexpected node type: %s, line %d, col %d", valueNode.Tag, valueNode.Line, valueNode.Column) + errors <- fmt.Errorf("build schema failed: unexpected data type: '%s', line %d, col %d", + utils.MakeTagReadable(valueNode), valueNode.Line, valueNode.Column) } } } diff --git a/datamodel/low/base/security_requirement.go b/datamodel/low/base/security_requirement.go index afb0a17..910f694 100644 --- a/datamodel/low/base/security_requirement.go +++ b/datamodel/low/base/security_requirement.go @@ -27,11 +27,13 @@ import ( // - https://swagger.io/specification/#security-requirement-object type SecurityRequirement struct { Requirements low.ValueReference[*orderedmap.Map[low.KeyReference[string], low.ValueReference[[]low.ValueReference[string]]]] + KeyNode *yaml.Node *low.Reference } // Build will extract security requirements from the node (the structure is odd, to be honest) -func (s *SecurityRequirement) Build(_ context.Context, _, root *yaml.Node, _ *index.SpecIndex) error { +func (s *SecurityRequirement) Build(_ context.Context, keyNode, root *yaml.Node, _ *index.SpecIndex) error { + s.KeyNode = keyNode root = utils.NodeAlias(root) utils.CheckForMergeNodes(root) s.Reference = new(low.Reference) diff --git a/datamodel/low/base/tag.go b/datamodel/low/base/tag.go index 0e7bb83..c1d58ed 100644 --- a/datamodel/low/base/tag.go +++ b/datamodel/low/base/tag.go @@ -26,6 +26,7 @@ type Tag struct { Description low.NodeReference[string] ExternalDocs low.NodeReference[*ExternalDoc] Extensions *orderedmap.Map[low.KeyReference[string], low.ValueReference[*yaml.Node]] + KeyNode *yaml.Node *low.Reference } @@ -35,7 +36,8 @@ func (t *Tag) FindExtension(ext string) *low.ValueReference[*yaml.Node] { } // Build will extract extensions and external docs for the Tag. -func (t *Tag) Build(ctx context.Context, _, root *yaml.Node, idx *index.SpecIndex) error { +func (t *Tag) Build(ctx context.Context, keyNode, root *yaml.Node, idx *index.SpecIndex) error { + t.KeyNode = keyNode root = utils.NodeAlias(root) utils.CheckForMergeNodes(root) t.Reference = new(low.Reference) diff --git a/datamodel/low/v3/callback.go b/datamodel/low/v3/callback.go index 5547e2a..be0d156 100644 --- a/datamodel/low/v3/callback.go +++ b/datamodel/low/v3/callback.go @@ -26,6 +26,7 @@ import ( type Callback struct { Expression *orderedmap.Map[low.KeyReference[string], low.ValueReference[*PathItem]] Extensions *orderedmap.Map[low.KeyReference[string], low.ValueReference[*yaml.Node]] + KeyNode *yaml.Node *low.Reference } @@ -40,7 +41,8 @@ func (cb *Callback) FindExpression(exp string) *low.ValueReference[*PathItem] { } // Build will extract extensions, expressions and PathItem objects for Callback -func (cb *Callback) Build(ctx context.Context, _, root *yaml.Node, idx *index.SpecIndex) error { +func (cb *Callback) Build(ctx context.Context, keyNode, root *yaml.Node, idx *index.SpecIndex) error { + cb.KeyNode = keyNode root = utils.NodeAlias(root) utils.CheckForMergeNodes(root) cb.Reference = new(low.Reference) diff --git a/datamodel/low/v3/encoding.go b/datamodel/low/v3/encoding.go index 68a5466..816a7b2 100644 --- a/datamodel/low/v3/encoding.go +++ b/datamodel/low/v3/encoding.go @@ -24,6 +24,7 @@ type Encoding struct { Style low.NodeReference[string] Explode low.NodeReference[bool] AllowReserved low.NodeReference[bool] + KeyNode *yaml.Node *low.Reference } @@ -50,7 +51,8 @@ func (en *Encoding) Hash() [32]byte { } // Build will extract all Header objects from supplied node. -func (en *Encoding) Build(ctx context.Context, _, root *yaml.Node, idx *index.SpecIndex) error { +func (en *Encoding) Build(ctx context.Context, keyNode, root *yaml.Node, idx *index.SpecIndex) error { + en.KeyNode = keyNode root = utils.NodeAlias(root) utils.CheckForMergeNodes(root) en.Reference = new(low.Reference) diff --git a/datamodel/low/v3/header.go b/datamodel/low/v3/header.go index 8f1c625..1d076ff 100644 --- a/datamodel/low/v3/header.go +++ b/datamodel/low/v3/header.go @@ -32,6 +32,7 @@ type Header struct { Examples low.NodeReference[*orderedmap.Map[low.KeyReference[string], low.ValueReference[*base.Example]]] Content low.NodeReference[*orderedmap.Map[low.KeyReference[string], low.ValueReference[*MediaType]]] Extensions *orderedmap.Map[low.KeyReference[string], low.ValueReference[*yaml.Node]] + KeyNode *yaml.Node *low.Reference } @@ -86,7 +87,8 @@ func (h *Header) Hash() [32]byte { } // Build will extract extensions, examples, schema and content/media types from node. -func (h *Header) Build(ctx context.Context, _, root *yaml.Node, idx *index.SpecIndex) error { +func (h *Header) Build(ctx context.Context, keyNode, root *yaml.Node, idx *index.SpecIndex) error { + h.KeyNode = keyNode root = utils.NodeAlias(root) utils.CheckForMergeNodes(root) h.Reference = new(low.Reference) diff --git a/datamodel/low/v3/link.go b/datamodel/low/v3/link.go index 2fb9021..b6525b7 100644 --- a/datamodel/low/v3/link.go +++ b/datamodel/low/v3/link.go @@ -35,6 +35,7 @@ type Link struct { Description low.NodeReference[string] Server low.NodeReference[*Server] Extensions *orderedmap.Map[low.KeyReference[string], low.ValueReference[*yaml.Node]] + KeyNode *yaml.Node *low.Reference } @@ -54,7 +55,8 @@ func (l *Link) FindExtension(ext string) *low.ValueReference[*yaml.Node] { } // Build will extract extensions and servers from the node. -func (l *Link) Build(ctx context.Context, _, root *yaml.Node, idx *index.SpecIndex) error { +func (l *Link) Build(ctx context.Context, keyNode, root *yaml.Node, idx *index.SpecIndex) error { + l.KeyNode = keyNode root = utils.NodeAlias(root) utils.CheckForMergeNodes(root) l.Reference = new(low.Reference) diff --git a/datamodel/low/v3/media_type.go b/datamodel/low/v3/media_type.go index d28754b..4666dc3 100644 --- a/datamodel/low/v3/media_type.go +++ b/datamodel/low/v3/media_type.go @@ -26,6 +26,7 @@ type MediaType struct { Examples low.NodeReference[*orderedmap.Map[low.KeyReference[string], low.ValueReference[*base.Example]]] Encoding low.NodeReference[*orderedmap.Map[low.KeyReference[string], low.ValueReference[*Encoding]]] Extensions *orderedmap.Map[low.KeyReference[string], low.ValueReference[*yaml.Node]] + KeyNode *yaml.Node *low.Reference } @@ -55,7 +56,8 @@ func (mt *MediaType) GetAllExamples() *orderedmap.Map[low.KeyReference[string], } // Build will extract examples, extensions, schema and encoding from node. -func (mt *MediaType) Build(ctx context.Context, _, root *yaml.Node, idx *index.SpecIndex) error { +func (mt *MediaType) Build(ctx context.Context, keyNode, root *yaml.Node, idx *index.SpecIndex) error { + mt.KeyNode = keyNode root = utils.NodeAlias(root) utils.CheckForMergeNodes(root) mt.Reference = new(low.Reference) diff --git a/datamodel/low/v3/oauth_flows.go b/datamodel/low/v3/oauth_flows.go index eb074ac..c2d4604 100644 --- a/datamodel/low/v3/oauth_flows.go +++ b/datamodel/low/v3/oauth_flows.go @@ -24,6 +24,7 @@ type OAuthFlows struct { ClientCredentials low.NodeReference[*OAuthFlow] AuthorizationCode low.NodeReference[*OAuthFlow] Extensions *orderedmap.Map[low.KeyReference[string], low.ValueReference[*yaml.Node]] + KeyNode *yaml.Node *low.Reference } @@ -38,7 +39,8 @@ func (o *OAuthFlows) FindExtension(ext string) *low.ValueReference[*yaml.Node] { } // Build will extract extensions and all OAuthFlow types from the supplied node. -func (o *OAuthFlows) Build(ctx context.Context, _, root *yaml.Node, idx *index.SpecIndex) error { +func (o *OAuthFlows) Build(ctx context.Context, keyNode, root *yaml.Node, idx *index.SpecIndex) error { + o.KeyNode = keyNode root = utils.NodeAlias(root) utils.CheckForMergeNodes(root) o.Reference = new(low.Reference) diff --git a/datamodel/low/v3/operation.go b/datamodel/low/v3/operation.go index 3109ab3..67a6d24 100644 --- a/datamodel/low/v3/operation.go +++ b/datamodel/low/v3/operation.go @@ -37,6 +37,7 @@ type Operation struct { Security low.NodeReference[[]low.ValueReference[*base.SecurityRequirement]] Servers low.NodeReference[[]low.ValueReference[*Server]] Extensions *orderedmap.Map[low.KeyReference[string], low.ValueReference[*yaml.Node]] + KeyNode *yaml.Node *low.Reference } @@ -59,7 +60,8 @@ func (o *Operation) FindSecurityRequirement(name string) []low.ValueReference[st } // Build will extract external docs, parameters, request body, responses, callbacks, security and servers. -func (o *Operation) Build(ctx context.Context, _, root *yaml.Node, idx *index.SpecIndex) error { +func (o *Operation) Build(ctx context.Context, keyNode, root *yaml.Node, idx *index.SpecIndex) error { + o.KeyNode = keyNode root = utils.NodeAlias(root) utils.CheckForMergeNodes(root) o.Reference = new(low.Reference) diff --git a/datamodel/low/v3/parameter.go b/datamodel/low/v3/parameter.go index 4037b67..a467066 100644 --- a/datamodel/low/v3/parameter.go +++ b/datamodel/low/v3/parameter.go @@ -22,6 +22,7 @@ import ( // A unique parameter is defined by a combination of a name and location. // - https://spec.openapis.org/oas/v3.1.0#parameter-object type Parameter struct { + KeyNode *yaml.Node Name low.NodeReference[string] In low.NodeReference[string] Description low.NodeReference[string] @@ -60,8 +61,9 @@ func (p *Parameter) GetExtensions() *orderedmap.Map[low.KeyReference[string], lo } // Build will extract examples, extensions and content/media types. -func (p *Parameter) Build(ctx context.Context, _, root *yaml.Node, idx *index.SpecIndex) error { +func (p *Parameter) Build(ctx context.Context, keyNode, root *yaml.Node, idx *index.SpecIndex) error { root = utils.NodeAlias(root) + p.KeyNode = keyNode utils.CheckForMergeNodes(root) p.Reference = new(low.Reference) p.Extensions = low.ExtractExtensions(root) diff --git a/datamodel/low/v3/path_item.go b/datamodel/low/v3/path_item.go index 7ce3f07..c83b7f6 100644 --- a/datamodel/low/v3/path_item.go +++ b/datamodel/low/v3/path_item.go @@ -39,6 +39,7 @@ type PathItem struct { Servers low.NodeReference[[]low.ValueReference[*Server]] Parameters low.NodeReference[[]low.ValueReference[*Parameter]] Extensions *orderedmap.Map[low.KeyReference[string], low.ValueReference[*yaml.Node]] + KeyNode *yaml.Node *low.Reference } @@ -103,7 +104,8 @@ func (p *PathItem) GetExtensions() *orderedmap.Map[low.KeyReference[string], low // Build extracts extensions, parameters, servers and each http method defined. // everything is extracted asynchronously for speed. -func (p *PathItem) Build(ctx context.Context, _, root *yaml.Node, idx *index.SpecIndex) error { +func (p *PathItem) Build(ctx context.Context, keyNode, root *yaml.Node, idx *index.SpecIndex) error { + p.KeyNode = keyNode root = utils.NodeAlias(root) utils.CheckForMergeNodes(root) p.Reference = new(low.Reference) diff --git a/datamodel/low/v3/paths.go b/datamodel/low/v3/paths.go index 1cda87e..a3db35e 100644 --- a/datamodel/low/v3/paths.go +++ b/datamodel/low/v3/paths.go @@ -27,6 +27,7 @@ import ( type Paths struct { PathItems *orderedmap.Map[low.KeyReference[string], low.ValueReference[*PathItem]] Extensions *orderedmap.Map[low.KeyReference[string], low.ValueReference[*yaml.Node]] + KeyNode *yaml.Node *low.Reference } @@ -64,7 +65,8 @@ func (p *Paths) GetExtensions() *orderedmap.Map[low.KeyReference[string], low.Va } // Build will extract extensions and all PathItems. This happens asynchronously for speed. -func (p *Paths) Build(ctx context.Context, _, root *yaml.Node, idx *index.SpecIndex) error { +func (p *Paths) Build(ctx context.Context, keyNode, root *yaml.Node, idx *index.SpecIndex) error { + p.KeyNode = keyNode root = utils.NodeAlias(root) utils.CheckForMergeNodes(root) p.Reference = new(low.Reference) diff --git a/datamodel/low/v3/request_body.go b/datamodel/low/v3/request_body.go index 5478f01..bb4ba8d 100644 --- a/datamodel/low/v3/request_body.go +++ b/datamodel/low/v3/request_body.go @@ -23,6 +23,7 @@ type RequestBody struct { Content low.NodeReference[*orderedmap.Map[low.KeyReference[string], low.ValueReference[*MediaType]]] Required low.NodeReference[bool] Extensions *orderedmap.Map[low.KeyReference[string], low.ValueReference[*yaml.Node]] + KeyNode *yaml.Node *low.Reference } @@ -42,7 +43,8 @@ func (rb *RequestBody) FindContent(cType string) *low.ValueReference[*MediaType] } // Build will extract extensions and MediaType objects from the node. -func (rb *RequestBody) Build(ctx context.Context, _, root *yaml.Node, idx *index.SpecIndex) error { +func (rb *RequestBody) Build(ctx context.Context, keyNode, root *yaml.Node, idx *index.SpecIndex) error { + rb.KeyNode = keyNode root = utils.NodeAlias(root) utils.CheckForMergeNodes(root) rb.Reference = new(low.Reference) diff --git a/datamodel/low/v3/response.go b/datamodel/low/v3/response.go index da52a4e..b1d4888 100644 --- a/datamodel/low/v3/response.go +++ b/datamodel/low/v3/response.go @@ -27,6 +27,7 @@ type Response struct { Content low.NodeReference[*orderedmap.Map[low.KeyReference[string], low.ValueReference[*MediaType]]] Extensions *orderedmap.Map[low.KeyReference[string], low.ValueReference[*yaml.Node]] Links low.NodeReference[*orderedmap.Map[low.KeyReference[string], low.ValueReference[*Link]]] + KeyNode *yaml.Node *low.Reference } @@ -56,7 +57,8 @@ func (r *Response) FindLink(hType string) *low.ValueReference[*Link] { } // Build will extract headers, extensions, content and links from node. -func (r *Response) Build(ctx context.Context, _, root *yaml.Node, idx *index.SpecIndex) error { +func (r *Response) Build(ctx context.Context, keyNode, root *yaml.Node, idx *index.SpecIndex) error { + r.KeyNode = keyNode root = utils.NodeAlias(root) utils.CheckForMergeNodes(root) r.Reference = new(low.Reference) diff --git a/datamodel/low/v3/responses.go b/datamodel/low/v3/responses.go index 1904e86..f2d2a2f 100644 --- a/datamodel/low/v3/responses.go +++ b/datamodel/low/v3/responses.go @@ -38,6 +38,7 @@ type Responses struct { Codes *orderedmap.Map[low.KeyReference[string], low.ValueReference[*Response]] Default low.NodeReference[*Response] Extensions *orderedmap.Map[low.KeyReference[string], low.ValueReference[*yaml.Node]] + KeyNode *yaml.Node *low.Reference } @@ -47,7 +48,8 @@ func (r *Responses) GetExtensions() *orderedmap.Map[low.KeyReference[string], lo } // Build will extract default response and all Response objects for each code -func (r *Responses) Build(ctx context.Context, _, root *yaml.Node, idx *index.SpecIndex) error { +func (r *Responses) Build(ctx context.Context, keyNode, root *yaml.Node, idx *index.SpecIndex) error { + r.KeyNode = keyNode root = utils.NodeAlias(root) r.Reference = new(low.Reference) r.Extensions = low.ExtractExtensions(root) diff --git a/datamodel/low/v3/security_scheme.go b/datamodel/low/v3/security_scheme.go index bf6bf36..48c2bcf 100644 --- a/datamodel/low/v3/security_scheme.go +++ b/datamodel/low/v3/security_scheme.go @@ -35,6 +35,7 @@ type SecurityScheme struct { Flows low.NodeReference[*OAuthFlows] OpenIdConnectUrl low.NodeReference[string] Extensions *orderedmap.Map[low.KeyReference[string], low.ValueReference[*yaml.Node]] + KeyNode *yaml.Node *low.Reference } @@ -49,7 +50,8 @@ func (ss *SecurityScheme) GetExtensions() *orderedmap.Map[low.KeyReference[strin } // Build will extract OAuthFlows and extensions from the node. -func (ss *SecurityScheme) Build(ctx context.Context, _, root *yaml.Node, idx *index.SpecIndex) error { +func (ss *SecurityScheme) Build(ctx context.Context, keyNode, root *yaml.Node, idx *index.SpecIndex) error { + ss.KeyNode = keyNode root = utils.NodeAlias(root) utils.CheckForMergeNodes(root) ss.Reference = new(low.Reference) diff --git a/datamodel/low/v3/server.go b/datamodel/low/v3/server.go index 737029b..e21a8db 100644 --- a/datamodel/low/v3/server.go +++ b/datamodel/low/v3/server.go @@ -22,6 +22,7 @@ type Server struct { Description low.NodeReference[string] Variables low.NodeReference[*orderedmap.Map[low.KeyReference[string], low.ValueReference[*ServerVariable]]] Extensions *orderedmap.Map[low.KeyReference[string], low.ValueReference[*yaml.Node]] + KeyNode *yaml.Node *low.Reference } @@ -36,7 +37,8 @@ func (s *Server) FindVariable(serverVar string) *low.ValueReference[*ServerVaria } // Build will extract server variables from the supplied node. -func (s *Server) Build(_ context.Context, _, root *yaml.Node, _ *index.SpecIndex) error { +func (s *Server) Build(_ context.Context, keyNode, root *yaml.Node, _ *index.SpecIndex) error { + s.KeyNode = keyNode root = utils.NodeAlias(root) utils.CheckForMergeNodes(root) s.Reference = new(low.Reference) diff --git a/datamodel/spec_info.go b/datamodel/spec_info.go index 13cd3b8..a4dd60b 100644 --- a/datamodel/spec_info.go +++ b/datamodel/spec_info.go @@ -7,11 +7,10 @@ import ( "encoding/json" "errors" "fmt" - "strings" - "time" - "github.com/pb33f/libopenapi/utils" "gopkg.in/yaml.v3" + "strings" + "time" ) const (