New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MAAS OpenAPI docs are not available in air-gapped mode #4648
Comments
Can we fix this before rc2? (expected Thursday Dec 15, 2022 - US central timezone). @anthonydillon @ndv99 |
So from my understanding, I think Jack wrote the page for our OpenAPI docs, which is served by the backend, and if I'm not mistaken that relies on being able to connect to https://unpkg.com/ in order to get the SwaggerUI library. To fix this I think I'd need to create a new page in the UI that uses the SwaggerUI lib through an NPM install so it will work offline. This would change the route from If this sounds like an acceptable solution I should be able to get that together fairly quick, what time is RC2 releasing? |
Actually I've had another thought/concern - the YAML output is generated serverside, so we'd need some kind of new endpoint to get that to the frontend, @SK1Y101 what do you think? |
I'm under the impression that air-gapped environments have no public internet access but should have full access to the maas instance and API. Sorry if I'm late to this but why would expect the docs to work locally without dynamic dependencies? |
Hi, commenting late on this because I only just read my emails. There was a note pinned to switch this over to locally storing the dependencies rather than relying on unpkg at some point™, but that was considered very low priority at the time. |
Fix in progress, should work as expected now |
Fix merged, closing as completed |
Bug originally filed by billwear at https://bugs.launchpad.net/bugs/1999579
To reproduce:
Install MAAS 3.3 RC1 or greater.
Take the MAAS server into air-gapped mode (i.e., "localhost" still working, but no ext. N/W).
Access the "local documentation" from the link in the bottom fringe of MAAS.
Click on "API documentation" OR replace the "maas-documentation-25.html" with "../api/docs"
A partial page will come up with some circles and boxes, but no text and no OpenAPI output.
Have confirmed with Peter M. that the OpenAPI docs require swagger components that are not stored locally and must be fetched online. The spec gave no indication that the OpenAPI docs had to work in air-gapped mode.
The text was updated successfully, but these errors were encountered: