@scalar/fastify-api-reference 1.26.1 → 1.28.1
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
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @scalar/fastify-api-reference
|
|
2
2
|
|
|
3
|
+
## 1.28.1
|
|
4
|
+
|
|
5
|
+
## 1.28.0
|
|
6
|
+
|
|
7
|
+
### Minor Changes
|
|
8
|
+
|
|
9
|
+
- 5f9a8a2: feat!: remove the spec prefix, make content and url top-level attributes
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [5f9a8a2]
|
|
14
|
+
- @scalar/types@0.1.0
|
|
15
|
+
- @scalar/core@0.1.3
|
|
16
|
+
- @scalar/openapi-parser@0.10.10
|
|
17
|
+
|
|
18
|
+
## 1.27.0
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies [fc6a45e]
|
|
23
|
+
- @scalar/types@0.0.41
|
|
24
|
+
- @scalar/core@0.1.2
|
|
25
|
+
- @scalar/openapi-parser@0.10.10
|
|
26
|
+
|
|
27
|
+
## 1.26.2
|
|
28
|
+
|
|
3
29
|
## 1.26.1
|
|
4
30
|
|
|
5
31
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fastifyApiReference.d.ts","sourceRoot":"","sources":["../src/fastifyApiReference.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAI9F,OAAO,KAAK,EAAmC,0BAA0B,EAAE,MAAM,YAAY,CAAA;AAwC7F;;GAEG;AACH,eAAO,MAAM,WAAW,s4EAwEvB,CAAA;AASD,QAAA,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"fastifyApiReference.d.ts","sourceRoot":"","sources":["../src/fastifyApiReference.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAI9F,OAAO,KAAK,EAAmC,0BAA0B,EAAE,MAAM,YAAY,CAAA;AAwC7F;;GAEG;AACH,eAAO,MAAM,WAAW,s4EAwEvB,CAAA;AASD,QAAA,MAAM,mBAAmB,sIAkMxB,CAAA;AAED,eAAe,mBAAmB,CAAA"}
|
|
@@ -120,7 +120,7 @@ const fastifyApiReference = fp(async (fastify, options) => {
|
|
|
120
120
|
...givenConfiguration,
|
|
121
121
|
};
|
|
122
122
|
const specSource = (() => {
|
|
123
|
-
const { content, url } = configuration
|
|
123
|
+
const { content, url } = configuration ?? {};
|
|
124
124
|
if (content)
|
|
125
125
|
return {
|
|
126
126
|
type: 'content',
|
|
@@ -247,10 +247,8 @@ const fastifyApiReference = fp(async (fastify, options) => {
|
|
|
247
247
|
if (specSource.type !== 'url') {
|
|
248
248
|
configuration = {
|
|
249
249
|
...configuration,
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
url: `.${getOpenApiDocumentEndpoints(options.openApiDocumentEndpoints).json}`,
|
|
253
|
-
},
|
|
250
|
+
// Use a relative URL in case we're proxied
|
|
251
|
+
url: `.${getOpenApiDocumentEndpoints(options.openApiDocumentEndpoints).json}`,
|
|
254
252
|
};
|
|
255
253
|
}
|
|
256
254
|
// Respond with the HTML document
|