@scalar/fastify-api-reference 1.25.19 → 1.25.20
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 +7 -0
- package/dist/fastifyApiReference.d.ts +2 -63
- package/dist/fastifyApiReference.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -4
- package/dist/js/standalone.js +1 -1
- package/dist/types.d.ts +65 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,66 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
export type FastifyApiReferenceOptions = {
|
|
4
|
-
/**
|
|
5
|
-
* If you’re prefixing Fastify with a path, you can set it here.
|
|
6
|
-
* It’ll be added to the JavaScript URL and the route.
|
|
7
|
-
*
|
|
8
|
-
* Example: `${publicPath}${routePrefix}/@scalar/fastify-api-reference/js/browser.js`
|
|
9
|
-
*/
|
|
10
|
-
publicPath?: string;
|
|
11
|
-
/**
|
|
12
|
-
* Prefix the route with a path. This is where the API Reference will be available.
|
|
13
|
-
*
|
|
14
|
-
* @default '/reference'
|
|
15
|
-
*/
|
|
16
|
-
routePrefix?: `/${string}`;
|
|
17
|
-
/**
|
|
18
|
-
* Set where the OpenAPI specification is exposed under `${routePrefix}`.
|
|
19
|
-
*
|
|
20
|
-
* The specification is always available on these endpoints, parsed by `@scalar/openapi-parser`.
|
|
21
|
-
*
|
|
22
|
-
* The specification is sourced from, in order of precedence:
|
|
23
|
-
* - `configuration.spec.content`
|
|
24
|
-
* - `configuration.spec.url` – fetched via `@scalar/openapi-parser/plugins/fetch-urls`
|
|
25
|
-
* - `@fastify/swagger` – if `configuration.spec` is not provided
|
|
26
|
-
*
|
|
27
|
-
* These endpoints can be used to fetch the OpenAPI specification for your own programmatic use.
|
|
28
|
-
*
|
|
29
|
-
* @default{ json: '/openapi.json', yaml: '/openapi.yaml' }
|
|
30
|
-
*/
|
|
31
|
-
openApiDocumentEndpoints?: {
|
|
32
|
-
/**
|
|
33
|
-
* Set where the OpenAPI specification is exposed under `${routePrefix}`, in JSON format.
|
|
34
|
-
*
|
|
35
|
-
* With the default value, the endpoint is: `${publicPath}${routePrefix}/openapi.json`
|
|
36
|
-
*
|
|
37
|
-
* @default '/openapi.json'
|
|
38
|
-
*/
|
|
39
|
-
json?: `/${string}`;
|
|
40
|
-
/**
|
|
41
|
-
* Set where the OpenAPI specification is exposed under `${routePrefix}`, in YAML format.
|
|
42
|
-
*
|
|
43
|
-
* With the default value, the endpoint is: `${publicPath}${routePrefix}/openapi.yaml`
|
|
44
|
-
*
|
|
45
|
-
* @default '/openapi.yaml'
|
|
46
|
-
*/
|
|
47
|
-
yaml?: `/${string}`;
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* The universal configuration object for @scalar/api-reference.
|
|
51
|
-
*
|
|
52
|
-
* Read more: https://github.com/scalar/scalar
|
|
53
|
-
*/
|
|
54
|
-
configuration?: ReferenceConfiguration;
|
|
55
|
-
/**
|
|
56
|
-
* The hooks for the API Reference.
|
|
57
|
-
*/
|
|
58
|
-
hooks?: FastifyApiReferenceHooksOptions;
|
|
59
|
-
};
|
|
60
|
-
export type FastifyApiReferenceHooksOptions = Partial<{
|
|
61
|
-
onRequest?: onRequestHookHandler;
|
|
62
|
-
preHandler?: preHandlerHookHandler;
|
|
63
|
-
}>;
|
|
1
|
+
import type { FastifyBaseLogger, FastifyTypeProviderDefault, RawServerDefault } from 'fastify';
|
|
2
|
+
import type { FastifyApiReferenceOptions } from './types';
|
|
64
3
|
/**
|
|
65
4
|
* The Fastify custom theme CSS
|
|
66
5
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fastifyApiReference.d.ts","sourceRoot":"","sources":["../src/fastifyApiReference.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fastifyApiReference.d.ts","sourceRoot":"","sources":["../src/fastifyApiReference.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,iBAAiB,EAEjB,0BAA0B,EAC1B,gBAAgB,EACjB,MAAM,SAAS,CAAA;AAIhB,OAAO,KAAK,EAEV,0BAA0B,EAC3B,MAAM,SAAS,CAAA;AA+BhB;;GAEG;AACH,eAAO,MAAM,UAAU,s4EAwEtB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,YAAa,0BAA0B,WAkB7D,CAAA;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,0BAA0B,UAgB/D;AAED,QAAA,MAAM,mBAAmB,sIAiLxB,CAAA;AAED,eAAe,mBAAmB,CAAA"}
|