[BUG] `/manpage/docs` is coming up blank
Describe the bug
When hitting the /manpage/docs endpoint, the page comes up blank, but the title is filled out correctly as GraphRAG - Swagger UI
Page source:
<!DOCTYPE html>
<html>
<head>
<link type="text/css" rel="stylesheet" href="[/static-offline-docs/swagger-ui.css](https://apim-xxxxxxxxxx.azure-api.net/static-offline-docs/swagger-ui.css)">
<link rel="shortcut icon" href="[/static-offline-docs/favicon.png](https://apim-xxxxxxxxxx.azure-api.net/static-offline-docs/favicon.png)">
<title>GraphRAG - Swagger UI</title>
</head>
<body>
<div id="swagger-ui">
</div>
<script src="[/static-offline-docs/swagger-ui-bundle.js](https://apim-xxxxxxxxxx.azure-api.net/static-offline-docs/swagger-ui-bundle.js)"></script>
<!-- `SwaggerUIBundle` is now available on the page -->
<script>
const ui = SwaggerUIBundle({
url: '/manpage/openapi.json',
"dom_id": "#swagger-ui",
"layout": "BaseLayout",
"deepLinking": true,
"showExtensions": true,
"showCommonExtensions": true,
oauth2RedirectUrl: window.location.origin + '/docs/oauth2-redirect',
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIBundle.SwaggerUIStandalonePreset
],
})
</script>
</body>
</html>
Here are the errors in my Developer Console:
It looks to me like the FastAPIOffline object is either not configured correctly or not working properly. I haven't been able to get it to work after playing for a while.
/manpage/openapi.json appears to be returning correctly.
🤔 To address the issue effectively, it would be helpful to have access to the image or URL provided in the original issue description. However, based on the provided information, we can still perform some troubleshooting and provide general guidance on resolving the issue.
Issue Summary:
-
Endpoint:
/manpage/docsis coming up blank. -
Title:
GraphRAG - Swagger UIis correctly displayed. - Page Source: The HTML source code is provided.
- Developer Console Errors: Errors are present but not detailed here.
Potential Causes:
-
Incorrect Swagger UI Configuration:
- The JavaScript configuration for Swagger UI might be incorrect.
-
Resource Loading Issues:
- The CSS, JavaScript, or OpenAPI JSON files might not be loading correctly.
-
FastAPIOffline Object Issues:
- The FastAPIOffline object might not be configured properly.
Troubleshooting Steps:
-
Check Resource URLs:
- Ensure that the CSS, JavaScript, and OpenAPI JSON files are accessible and correctly linked.
-
Verify Swagger UI Configuration:
- Ensure that the
url,dom_id, and other configurations for Swagger UI are correct.
- Ensure that the
-
Inspect Developer Console Errors:
- Identify and address specific errors shown in the Developer Console.
Suggested Actions:
-
Check the Network Tab:
- Open the browser's Developer Tools and check the Network tab to see if all resources are loading correctly.
-
Validate OpenAPI JSON:
- Check if
/manpage/openapi.jsonis returning the correct OpenAPI specification.
- Check if
-
Debug FastAPIOffline Configuration:
- Review the configuration and initialization of the FastAPIOffline object.
If you can provide more details on the specific errors in the Developer Console or any additional information, I can assist further in pinpointing the issue.
👀
I can still assist in troubleshooting and potentially fixing the issue based on the provided details, even with/without the image. Let's proceed with the information we have.
Summary of the Issue:
-
Endpoint:
/manpage/docsis coming up blank. -
Title: Correctly displayed as
GraphRAG - Swagger UI. - HTML Source Code: Provided in the issue description.
- Developer Console Errors: Not detailed, but errors are present.
Potential Issues and Solutions:
-
Incorrect Swagger UI Configuration:
- Ensure the
url,dom_id, and other parameters in theSwaggerUIBundleinitialization are correct.
<script> const ui = SwaggerUIBundle({ url: '/manpage/openapi.json', dom_id: '#swagger-ui', layout: 'BaseLayout', deepLinking: true, showExtensions: true, showCommonExtensions: true, oauth2RedirectUrl: window.location.origin + '/docs/oauth2-redirect', presets: [ SwaggerUIBundle.presets.apis, SwaggerUIBundle.SwaggerUIStandalonePreset ], }); </script> - Ensure the
-
Resource Loading Issues:
- Ensure that CSS and JavaScript files are accessible. Test their URLs directly in the browser to confirm they load correctly:
-
[/static-offline-docs/swagger-ui.css](https://apim-xxxxxxxxxx.azure-api.net/static-offline-docs/swagger-ui.css) -
[/static-offline-docs/swagger-ui-bundle.js](https://apim-xxxxxxxxxx.azure-api.net/static-offline-docs/swagger-ui-bundle.js)
-
- Ensure that CSS and JavaScript files are accessible. Test their URLs directly in the browser to confirm they load correctly:
-
OpenAPI JSON Accessibility:
- Confirm that
/manpage/openapi.jsonreturns the proper OpenAPI specification. Test this URL in the browser or using a tool likecurl.
- Confirm that
-
FastAPIOffline Configuration:
- Review the FastAPIOffline object configuration to ensure it is set up correctly to serve the OpenAPI JSON and static files.
Action Plan:
-
Verify Resource URLs:
- Check if the CSS and JavaScript files are correctly loaded.
-
Check OpenAPI JSON:
- Confirm that the OpenAPI JSON is accessible and correctly formatted.
-
Inspect Developer Console:
- Identify specific errors in the Developer Console and address them accordingly.
-
Review FastAPIOffline Configuration:
- Ensure that the FastAPIOffline object is correctly configured to serve static files and the OpenAPI JSON.
If more detailed errors from the Developer Console or any additional information can be provided, it would help in further diagnosing and resolving the issue.