mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-06 20:47:49 +00:00
@@ -568,6 +568,11 @@ components:
|
|||||||
x, y = f.(*rolodexFile).Index(cf)
|
x, y = f.(*rolodexFile).Index(cf)
|
||||||
assert.Nil(t, x)
|
assert.Nil(t, x)
|
||||||
assert.Error(t, y)
|
assert.Error(t, y)
|
||||||
|
|
||||||
|
// file file that is not local, but is remote
|
||||||
|
f, _ = rolodex.Open("/bingo/jingo.yaml")
|
||||||
|
assert.NotNil(t, f)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func test_rolodexDeepRefServer(a, b, c, d, e []byte) *httptest.Server {
|
func test_rolodexDeepRefServer(a, b, c, d, e []byte) *httptest.Server {
|
||||||
@@ -593,6 +598,10 @@ func test_rolodexDeepRefServer(a, b, c, d, e []byte) *httptest.Server {
|
|||||||
_, _ = rw.Write(e)
|
_, _ = rw.Write(e)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if strings.HasSuffix(req.URL.String(), "/bingo/jingo.yaml") {
|
||||||
|
_, _ = rw.Write([]byte("openapi: 3.1.0"))
|
||||||
|
return
|
||||||
|
}
|
||||||
rw.WriteHeader(http.StatusInternalServerError)
|
rw.WriteHeader(http.StatusInternalServerError)
|
||||||
rw.Write([]byte("500 - COMPUTAR SAYS NO!"))
|
rw.Write([]byte("500 - COMPUTAR SAYS NO!"))
|
||||||
}))
|
}))
|
||||||
|
|||||||
Reference in New Issue
Block a user