MCPcopy Index your code
hub / github.com/getkin/kin-openapi / LoadFromDataWithPath

Method LoadFromDataWithPath

openapi3/loader.go:183–186  ·  view source on GitHub ↗

LoadFromDataWithPath takes the OpenAPI document data in bytes and a path where the resolver can find referred elements and returns a *T with all resolved data or an error if unable to load data or resolve refs.

(data []byte, location *url.URL)

Source from the content-addressed store, hash-verified

181// LoadFromDataWithPath takes the OpenAPI document data in bytes and a path where the resolver can find referred
182// elements and returns a *T with all resolved data or an error if unable to load data or resolve refs.
183func (loader *Loader) LoadFromDataWithPath(data []byte, location *url.URL) (*T, error) {
184 loader.resetVisitedPathItemRefs()
185 return loader.loadFromDataWithPathInternal(data, location)
186}
187
188func (loader *Loader) loadFromDataWithPathInternal(data []byte, location *url.URL) (*T, error) {
189 if loader.visitedDocuments == nil {

Calls 2