Closed croraf closed 7 years ago
I think I deleted typedarray-to-buffer library that was installed outside of node_modules, perhaps this caused the issue. Will check today later. If you can test GET
with Accept: application/json
works properly on swagger2-koa version 0.0.36.
I think I found the cause. I used the following order:
app.use(validate(document));
app.use(ui(document));
app.use(router.routes());
Instead the following is correct:
app.use(validate(document));
app.use(router.routes());
app.use(ui(document));
I will test once more later and close the issue. Can you confirm the latter is the correct way?
Yes, the ui middleware should come last.
I described the issue in depth here:
https://github.com/swagger-api/swagger-ui/issues/3282
swagger2-koa version 0.0.36. UPDATE: I didn't use swagger2-koa
router
, butvalidate
andui
functions.