Brijesh619 opened a new pull request, #721: URL: https://github.com/apache/atlas/pull/721
## What changes were proposed in this pull request? This PR resolves [ATLAS-5363](https://issues.apache.org/jira/browse/ATLAS-5363) by fixing the broken styling on the Enunciate-generated REST API documentation caused by Content Security Policy (CSP) violations on `atlas.apache.org`. Previously, the generated API docs loaded Bootstrap, jQuery, and prettify assets from external CDNs, which were blocked by the strict CSP rules on the Apache domain, resulting in unstyled pages. This patch introduces the following changes: - Adds local, static copies of the required frontend assets (`bootstrap.min.css`, `bootstrap.min.js`, `jquery-1.12.2.min.js`, and `run_prettify.js`) into `webapp/src/main/enunciate-assets`. - Updates `webapp/pom.xml` to copy these local assets into the generated Enunciate documentation output directories (`target/api/v2/` and `target/api/v2/apidocs/ui/`) during the build. - Adds an Ant `<replace>` task in the build process to scan the generated Enunciate HTML files and swap out the external CDN URLs for local, relative paths pointing to the bundled CSS/JS files. ## How was this patch tested? - **Manual Build Testing:** Ran `mvn clean package` and verified that the `enunciate-assets` are correctly copied into `webapp/target/api/v2/` and its subdirectories. - **HTML Verification:** Inspected the generated `index.html` and verified that the CDN links were successfully replaced with relative paths (e.g., `href="css/bootstrap.min.css"` and `src="js/jquery-1.12.2.min.js"`). - **Local Browser Testing:** Served the generated `webapp/target/api/v2/apidocs/` directory locally and verified in the browser that the styling, layout, and JavaScript formatting (run_prettify) load properly without any CSP errors in the browser console. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
