MCPcopy Create free account
hub / github.com/getkin/kin-openapi / resolvePathWithRef

Method resolvePathWithRef

openapi3/loader.go:321–330  ·  view source on GitHub ↗
(ref string, rootPath *url.URL)

Source from the content-addressed store, hash-verified

319}
320
321func (loader *Loader) resolvePathWithRef(ref string, rootPath *url.URL) (*url.URL, error) {
322 parsedURL, err := url.Parse(ref)
323 if err != nil {
324 return nil, fmt.Errorf("cannot parse reference: %q: %w", ref, err)
325 }
326
327 resolvedPath := loader.resolvePath(rootPath, parsedURL)
328 resolvedPath.Fragment = parsedURL.Fragment
329 return resolvedPath, nil
330}
331
332func (loader *Loader) resolveRefPath(ref string, path *url.URL) (*url.URL, error) {
333 if ref != "" && ref[0] == '#' {

Callers 2

resolveRefPathMethod · 0.95

Calls 1

resolvePathMethod · 0.95

Tested by

no test coverage detected