mirror of
https://github.com/rajnandan1/kener.git
synced 2026-02-08 09:48:46 -06:00
fix: API Reference page not loading (#532)
The API reference page was blank because spec.content expected a parsed JSON object but received a JSON string. Added JSON.parse() to properly parse the OpenAPI spec before passing it to @scalar/express-api-reference. Fixes #532
This commit is contained in:
2
main.js
2
main.js
@@ -41,7 +41,7 @@ process.env.UPLOAD_PATH = "./uploads";
|
||||
app.use(base + "/uploads", express.static("uploads"));
|
||||
|
||||
try {
|
||||
const openapiJSON = fs.readFileSync("./openapi.json", "utf-8");
|
||||
const openapiJSON = JSON.parse(fs.readFileSync("./openapi.json", "utf-8"));
|
||||
app.use(
|
||||
"/api-reference",
|
||||
apiReference({
|
||||
|
||||
Reference in New Issue
Block a user