Skip to content

Commit

Permalink
Merge pull request #146 from agmikhailov/patch-1
Browse files Browse the repository at this point in the history
go-swagger throws error on Windows if application path contains parentheses
  • Loading branch information
casualjim authored Oct 9, 2021
2 parents bcd013b + e8e27ff commit fed826c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion schema_loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,14 @@ func (r *schemaLoader) load(refURL *url.URL) (interface{}, url.URL, bool, error)
normalized := normalizeBase(pth)
debugLog("loading doc from: %s", normalized)

data, fromCache := r.cache.Get(normalized)
unescaped, err := url.PathUnescape(normalized)
if err != nil {
return nil, url.URL{}, false, err
}

u := url.URL{Path: unescaped}

data, fromCache := r.cache.Get(u.RequestURI())
if fromCache {
return data, toFetch, fromCache, nil
}
Expand Down

0 comments on commit fed826c

Please sign in to comment.