[NETCONF-764] Apidoc require JS resource from public internet Created: 04/Mar/21  Updated: 24/Dec/21  Resolved: 22/Dec/21

Status: Resolved
Project: netconf
Component/s: restconf-openapi
Affects Version/s: 1.13.0
Fix Version/s: 1.13.6, 2.0.12

Type: Bug Priority: Medium
Reporter: Richard Kosegi Assignee: Robert Varga
Resolution: Done Votes: 0
Labels: pt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File [NETCONF-764] Steps to reproduce.rtf    

 Description   

Apidoc is trying to load JQuery library from public internet.

 

restconf/sal-rest-docgen/src/main/resources/explorer/index.html#L40

 

<script src="https://code.jquery.com/jquery-3.4.1.js"></script>

 

This make it unusable in controlled environment, where access to internet is restricted.



 Comments   
Comment by Robert Varga [ 19/Nov/21 ]

Right, so we need to package JQuery in the artifact itself to provide stability.
Hence we should use https://github.com/maven-download-plugin/maven-download-plugin#wget-goal with a properly-configured sha512 sum.

While we are in this area, we should switch to latest JQuery version and also use the minified file, such as https://code.jquery.com/jquery-3.6.0.min.js

The script needs to land right next to index.html in the resulting jar and index.html needs to use a relative reference to it.

Generated at Wed Feb 07 20:15:50 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.