@forinda/kickjs-swagger 2.0.1 → 2.1.0

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.
@@ -1,44 +0,0 @@
1
- import { type AppAdapter, type AdapterContext } from '@forinda/kickjs';
2
- import { registerControllerForDocs, clearRegisteredRoutes, type SwaggerOptions } from './openapi-builder';
3
- export interface SwaggerAdapterOptions extends SwaggerOptions {
4
- /** Path to serve Swagger UI (default: '/docs') */
5
- docsPath?: string;
6
- /** Path to serve ReDoc (default: '/redoc') */
7
- redocPath?: string;
8
- /** Path to serve the raw JSON spec (default: '/openapi.json') */
9
- specPath?: string;
10
- /** Other adapters to discover (e.g., WsAdapter for WebSocket server URLs) */
11
- adapters?: any[];
12
- }
13
- /**
14
- * Swagger adapter — auto-generates OpenAPI spec from decorators and serves docs.
15
- *
16
- * @example
17
- * ```ts
18
- * bootstrap({
19
- * modules,
20
- * adapters: [
21
- * new SwaggerAdapter({
22
- * info: { title: 'My API', version: '1.0.0' },
23
- * }),
24
- * ],
25
- * })
26
- * ```
27
- *
28
- * Endpoints:
29
- * GET /docs — Swagger UI
30
- * GET /redoc — ReDoc
31
- * GET /openapi.json — Raw OpenAPI 3.0.3 spec
32
- */
33
- export declare class SwaggerAdapter implements AppAdapter {
34
- private options;
35
- name: string;
36
- constructor(options?: SwaggerAdapterOptions);
37
- /** Auto-detect server URLs from the running HTTP server and peer adapters */
38
- afterStart({ server }: AdapterContext): void;
39
- /** Collect controller metadata as routes are mounted */
40
- onRouteMount(controllerClass: any, mountPath: string): void;
41
- beforeMount({ app }: AdapterContext): void;
42
- }
43
- export { registerControllerForDocs, clearRegisteredRoutes };
44
- //# sourceMappingURL=swagger.adapter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"swagger.adapter.d.ts","sourceRoot":"","sources":["../src/swagger.adapter.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,KAAK,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAC9E,OAAO,EAEL,yBAAyB,EACzB,qBAAqB,EACrB,KAAK,cAAc,EACpB,MAAM,mBAAmB,CAAA;AAK1B,MAAM,WAAW,qBAAsB,SAAQ,cAAc;IAC3D,kDAAkD;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAA;CACjB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,cAAe,YAAW,UAAU;IAGnC,OAAO,CAAC,OAAO;IAF3B,IAAI,SAAmB;gBAEH,OAAO,GAAE,qBAA0B;IAEvD,6EAA6E;IAC7E,UAAU,CAAC,EAAE,MAAM,EAAE,EAAE,cAAc,GAAG,IAAI;IA0B5C,wDAAwD;IACxD,YAAY,CAAC,eAAe,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI;IAI3D,WAAW,CAAC,EAAE,GAAG,EAAE,EAAE,cAAc,GAAG,IAAI;CA+C3C;AAGD,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,CAAA"}
package/dist/ui.d.ts DELETED
@@ -1,5 +0,0 @@
1
- /** Generate Swagger UI HTML that loads from CDN */
2
- export declare function swaggerUIHtml(specUrl: string, title?: string): string;
3
- /** Generate ReDoc HTML that loads from CDN */
4
- export declare function redocHtml(specUrl: string, title?: string): string;
5
- //# sourceMappingURL=ui.d.ts.map
package/dist/ui.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":"AAUA,mDAAmD;AACnD,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,SAAa,GAAG,MAAM,CA4BzE;AAED,8CAA8C;AAC9C,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,SAAa,GAAG,MAAM,CAgBrE"}