-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(swagger-ui): use jsdelivr instead of unpkg to serve swagger-ui a…
…ssets (#701) * perf: use jsdelivr instead of unpkg to serve swagger-ui assets * format * add changeset
- Loading branch information
Showing
4 changed files
with
24 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@hono/swagger-ui': patch | ||
--- | ||
|
||
perf: use jsdelivr instead of unpkg to serve swagger-ui assets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,8 +8,8 @@ describe('SwaggerUI Rendering', () => { | |
expect(SwaggerUI({ url }).toString()).toEqual(` | ||
<div> | ||
<div id="swagger-ui"></div> | ||
<link rel="stylesheet" href="https://unpkg.com/swagger-ui-dist/swagger-ui.css" /> | ||
<script src="https://unpkg.com/swagger-ui-dist/swagger-ui-bundle.js" crossorigin="anonymous"></script> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swagger-ui-dist/swagger-ui.css" /> | ||
<script src="https://cdn.jsdelivr.net/npm/swagger-ui-dist/swagger-ui-bundle.js" crossorigin="anonymous"></script> | ||
<script> | ||
window.onload = () => { | ||
window.ui = SwaggerUIBundle({ | ||
|
@@ -25,8 +25,8 @@ describe('SwaggerUI Rendering', () => { | |
expect(SwaggerUI({ url, version: '5.0.0' }).toString()).toEqual(` | ||
<div> | ||
<div id="swagger-ui"></div> | ||
<link rel="stylesheet" href="https://unpkg.com/[email protected]/swagger-ui.css" /> | ||
<script src="https://unpkg.com/[email protected]/swagger-ui-bundle.js" crossorigin="anonymous"></script> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/swagger-ui.css" /> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/swagger-ui-bundle.js" crossorigin="anonymous"></script> | ||
<script> | ||
window.onload = () => { | ||
window.ui = SwaggerUIBundle({ | ||
|
@@ -51,8 +51,8 @@ describe('SwaggerUI Rendering', () => { | |
).toEqual(` | ||
<div> | ||
<div id="swagger-ui"></div> | ||
<link rel="stylesheet" href="https://unpkg.com/swagger-ui-dist/swagger-ui.css" /> | ||
<script src="https://unpkg.com/swagger-ui-dist/swagger-ui-bundle.js" crossorigin="anonymous"></script> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swagger-ui-dist/swagger-ui.css" /> | ||
<script src="https://cdn.jsdelivr.net/npm/swagger-ui-dist/swagger-ui-bundle.js" crossorigin="anonymous"></script> | ||
<script> | ||
window.onload = () => { | ||
window.ui = SwaggerUIBundle({ | ||
|
@@ -89,8 +89,8 @@ describe('SwaggerUI Rendering', () => { | |
` | ||
<div> | ||
<div id="swagger-ui-manually"></div> | ||
<link rel="stylesheet" href="https://unpkg.com/swagger-ui-dist/swagger-ui.css" /> | ||
<script src="https://unpkg.com/swagger-ui-dist/swagger-ui-bundle.js" crossorigin="anonymous"></script> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swagger-ui-dist/swagger-ui.css" /> | ||
<script src="https://cdn.jsdelivr.net/npm/swagger-ui-dist/swagger-ui-bundle.js" crossorigin="anonymous"></script> | ||
<script> | ||
window.onload = () => { | ||
window.ui = SwaggerUIBundle({ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters