@scalar/fastify-api-reference 0.6.36 → 0.6.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/README.md +11 -3
- package/dist/fastifyApiReference.d.ts +3 -4
- package/dist/fastifyApiReference.d.ts.map +1 -1
- package/dist/index.cjs +6 -6
- package/dist/index.js +6 -6
- package/dist/templates/fastify-api-reference.js +20677 -20133
- package/dist/templates/index.ejs +9 -9
- package/package.json +2 -2
package/dist/templates/index.ejs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html>
|
|
3
3
|
<head>
|
|
4
|
-
<title><%= options.apiReference.
|
|
4
|
+
<title><%= options.apiReference.pageTitle || 'API Reference' %></title>
|
|
5
5
|
<meta charset="utf-8" />
|
|
6
6
|
<meta
|
|
7
7
|
name="viewport"
|
|
@@ -13,15 +13,15 @@
|
|
|
13
13
|
</style>
|
|
14
14
|
</head>
|
|
15
15
|
<body>
|
|
16
|
-
<% if (options.apiReference?.
|
|
17
|
-
<script id="api-reference" data-url="<%= options.apiReference?.
|
|
18
|
-
<% } else if (typeof options.apiReference?.spec === 'object') { %>
|
|
19
|
-
<script id="api-reference" type="application/json">
|
|
20
|
-
<%- JSON.stringify(options.apiReference?.spec) %>
|
|
16
|
+
<% if (options.apiReference?.spec?.url) { %>
|
|
17
|
+
<script id="api-reference" data-configuration='<%- JSON.stringify(options.apiReference ?? {}) %>' data-url="<%= options.apiReference?.spec?.url %>"></script>
|
|
18
|
+
<% } else if (typeof options.apiReference?.spec?.content === 'object') { %>
|
|
19
|
+
<script id="api-reference" data-configuration='<%- JSON.stringify(options.apiReference ?? {}) %>' type="application/json">
|
|
20
|
+
<%- JSON.stringify(options.apiReference?.spec?.content) %>
|
|
21
21
|
</script>
|
|
22
|
-
<% } else if (options.apiReference?.spec) { %>
|
|
23
|
-
<script id="api-reference" type="application/json">
|
|
24
|
-
<%- JSON.stringify(options.apiReference?.spec()) %>
|
|
22
|
+
<% } else if (options.apiReference?.spec?.content) { %>
|
|
23
|
+
<script id="api-reference" data-configuration='<%- JSON.stringify(options.apiReference ?? {}) %>' type="application/json">
|
|
24
|
+
<%- JSON.stringify(options.apiReference?.spec.content()) %>
|
|
25
25
|
</script>
|
|
26
26
|
<% } %>
|
|
27
27
|
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scalar/fastify-api-reference",
|
|
3
3
|
"description": "a fastify plugin to render an API reference from a Swagger spec",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.38",
|
|
5
5
|
"author": "Scalar (https://github.com/scalar)",
|
|
6
6
|
"bugs": "https://github.com/scalar/scalar/issues/new",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"ejs": "3.1.9",
|
|
9
|
-
"@scalar/api-reference": "0.8.
|
|
9
|
+
"@scalar/api-reference": "0.8.2"
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@vitejs/plugin-vue": "4.3.4",
|