nestjs-openapi 0.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.
- package/LICENSE +21 -0
- package/README.md +96 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.mjs +139 -0
- package/dist/index.d.mts +896 -0
- package/dist/index.d.ts +896 -0
- package/dist/index.mjs +297 -0
- package/dist/internal.d.mts +2 -0
- package/dist/internal.d.ts +2 -0
- package/dist/internal.mjs +53 -0
- package/dist/shared/nestjs-openapi.B1bBy_tG.mjs +1529 -0
- package/dist/shared/nestjs-openapi.BYUrTaMo.d.mts +355 -0
- package/dist/shared/nestjs-openapi.BYUrTaMo.d.ts +355 -0
- package/dist/shared/nestjs-openapi.DlNMM8Zq.mjs +1831 -0
- package/package.json +112 -0
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
import { Schema, Effect } from 'effect';
|
|
2
|
+
|
|
3
|
+
declare const ProjectInitError_base: Schema.TaggedErrorClass<ProjectInitError, "ProjectInitError", {
|
|
4
|
+
readonly _tag: Schema.tag<"ProjectInitError">;
|
|
5
|
+
} & {
|
|
6
|
+
tsconfig: typeof Schema.String;
|
|
7
|
+
message: typeof Schema.String;
|
|
8
|
+
cause: Schema.optional<typeof Schema.Unknown>;
|
|
9
|
+
}>;
|
|
10
|
+
declare class ProjectInitError extends ProjectInitError_base {
|
|
11
|
+
static create(tsconfig: string, cause?: unknown): ProjectInitError;
|
|
12
|
+
}
|
|
13
|
+
declare const EntryNotFoundError_base: Schema.TaggedErrorClass<EntryNotFoundError, "EntryNotFoundError", {
|
|
14
|
+
readonly _tag: Schema.tag<"EntryNotFoundError">;
|
|
15
|
+
} & {
|
|
16
|
+
entry: typeof Schema.String;
|
|
17
|
+
className: typeof Schema.String;
|
|
18
|
+
message: typeof Schema.String;
|
|
19
|
+
}>;
|
|
20
|
+
declare class EntryNotFoundError extends EntryNotFoundError_base {
|
|
21
|
+
static fileNotFound(entry: string): EntryNotFoundError;
|
|
22
|
+
static classNotFound(entry: string, className: string): EntryNotFoundError;
|
|
23
|
+
}
|
|
24
|
+
type ProjectError = ProjectInitError | EntryNotFoundError;
|
|
25
|
+
declare const ConfigNotFoundError_base: Schema.TaggedErrorClass<ConfigNotFoundError, "ConfigNotFoundError", {
|
|
26
|
+
readonly _tag: Schema.tag<"ConfigNotFoundError">;
|
|
27
|
+
} & {
|
|
28
|
+
path: Schema.optional<typeof Schema.String>;
|
|
29
|
+
searchDir: Schema.optional<typeof Schema.String>;
|
|
30
|
+
message: typeof Schema.String;
|
|
31
|
+
}>;
|
|
32
|
+
declare class ConfigNotFoundError extends ConfigNotFoundError_base {
|
|
33
|
+
static notFound(searchDir: string): ConfigNotFoundError;
|
|
34
|
+
static pathNotFound(path: string): ConfigNotFoundError;
|
|
35
|
+
}
|
|
36
|
+
declare const ConfigLoadError_base: Schema.TaggedErrorClass<ConfigLoadError, "ConfigLoadError", {
|
|
37
|
+
readonly _tag: Schema.tag<"ConfigLoadError">;
|
|
38
|
+
} & {
|
|
39
|
+
path: typeof Schema.String;
|
|
40
|
+
message: typeof Schema.String;
|
|
41
|
+
cause: Schema.optional<typeof Schema.Unknown>;
|
|
42
|
+
}>;
|
|
43
|
+
declare class ConfigLoadError extends ConfigLoadError_base {
|
|
44
|
+
static importFailed(path: string, cause?: unknown): ConfigLoadError;
|
|
45
|
+
static noExport(path: string): ConfigLoadError;
|
|
46
|
+
}
|
|
47
|
+
declare const ConfigValidationError_base: Schema.TaggedErrorClass<ConfigValidationError, "ConfigValidationError", {
|
|
48
|
+
readonly _tag: Schema.tag<"ConfigValidationError">;
|
|
49
|
+
} & {
|
|
50
|
+
path: typeof Schema.String;
|
|
51
|
+
message: typeof Schema.String;
|
|
52
|
+
issues: Schema.Array$<typeof Schema.String>;
|
|
53
|
+
}>;
|
|
54
|
+
declare class ConfigValidationError extends ConfigValidationError_base {
|
|
55
|
+
static fromIssues(path: string, issues: readonly string[]): ConfigValidationError;
|
|
56
|
+
}
|
|
57
|
+
type ConfigError = ConfigNotFoundError | ConfigLoadError | ConfigValidationError;
|
|
58
|
+
declare const InvalidMethodError_base: Schema.TaggedErrorClass<InvalidMethodError, "InvalidMethodError", {
|
|
59
|
+
readonly _tag: Schema.tag<"InvalidMethodError">;
|
|
60
|
+
} & {
|
|
61
|
+
controllerName: typeof Schema.String;
|
|
62
|
+
methodName: typeof Schema.String;
|
|
63
|
+
message: typeof Schema.String;
|
|
64
|
+
}>;
|
|
65
|
+
declare class InvalidMethodError extends InvalidMethodError_base {
|
|
66
|
+
static create(controllerName: string, methodName: string, reason: string): InvalidMethodError;
|
|
67
|
+
}
|
|
68
|
+
type AnalysisError = InvalidMethodError;
|
|
69
|
+
type GeneratorError = ProjectError | ConfigError | AnalysisError;
|
|
70
|
+
|
|
71
|
+
declare const ParameterLocation: Schema.Literal<["path", "query", "header", "cookie", "body"]>;
|
|
72
|
+
type ParameterLocation = typeof ParameterLocation.Type;
|
|
73
|
+
/** Validation constraints that can be applied to parameters (plain interface for perf) */
|
|
74
|
+
interface ParameterConstraints {
|
|
75
|
+
readonly minLength?: number;
|
|
76
|
+
readonly maxLength?: number;
|
|
77
|
+
readonly pattern?: string;
|
|
78
|
+
readonly format?: string;
|
|
79
|
+
readonly minimum?: number;
|
|
80
|
+
readonly maximum?: number;
|
|
81
|
+
readonly exclusiveMinimum?: number;
|
|
82
|
+
readonly exclusiveMaximum?: number;
|
|
83
|
+
readonly minItems?: number;
|
|
84
|
+
readonly maxItems?: number;
|
|
85
|
+
readonly enum?: readonly unknown[];
|
|
86
|
+
readonly type?: string;
|
|
87
|
+
}
|
|
88
|
+
declare const ResolvedParameter: Schema.Struct<{
|
|
89
|
+
name: typeof Schema.String;
|
|
90
|
+
location: Schema.Literal<["path", "query", "header", "cookie", "body"]>;
|
|
91
|
+
tsType: typeof Schema.String;
|
|
92
|
+
required: typeof Schema.Boolean;
|
|
93
|
+
description: Schema.OptionFromNullOr<typeof Schema.String>;
|
|
94
|
+
}>;
|
|
95
|
+
interface ResolvedParameter extends Schema.Schema.Type<typeof ResolvedParameter> {
|
|
96
|
+
/** Validation constraints from decorators like @Min, @Max, @IsEnum, etc. */
|
|
97
|
+
readonly constraints?: ParameterConstraints;
|
|
98
|
+
}
|
|
99
|
+
declare const ReturnTypeInfo: Schema.Struct<{
|
|
100
|
+
type: Schema.OptionFromNullOr<typeof Schema.String>;
|
|
101
|
+
inline: Schema.OptionFromNullOr<typeof Schema.String>;
|
|
102
|
+
container: Schema.OptionFromNullOr<Schema.Literal<["array"]>>;
|
|
103
|
+
filePath: Schema.OptionFromNullOr<typeof Schema.String>;
|
|
104
|
+
}>;
|
|
105
|
+
type ReturnTypeInfo = typeof ReturnTypeInfo.Type;
|
|
106
|
+
declare const HttpMethod: Schema.Literal<["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD", "ALL"]>;
|
|
107
|
+
type HttpMethod = typeof HttpMethod.Type;
|
|
108
|
+
declare const MethodInfo: Schema.Struct<{
|
|
109
|
+
httpMethod: Schema.Literal<["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD", "ALL"]>;
|
|
110
|
+
path: typeof Schema.String;
|
|
111
|
+
methodName: typeof Schema.String;
|
|
112
|
+
controllerName: typeof Schema.String;
|
|
113
|
+
controllerTags: Schema.Array$<typeof Schema.String>;
|
|
114
|
+
returnType: Schema.Struct<{
|
|
115
|
+
type: Schema.OptionFromNullOr<typeof Schema.String>;
|
|
116
|
+
inline: Schema.OptionFromNullOr<typeof Schema.String>;
|
|
117
|
+
container: Schema.OptionFromNullOr<Schema.Literal<["array"]>>;
|
|
118
|
+
filePath: Schema.OptionFromNullOr<typeof Schema.String>;
|
|
119
|
+
}>;
|
|
120
|
+
parameters: Schema.Array$<Schema.Struct<{
|
|
121
|
+
name: typeof Schema.String;
|
|
122
|
+
location: Schema.Literal<["path", "query", "header", "cookie", "body"]>;
|
|
123
|
+
tsType: typeof Schema.String;
|
|
124
|
+
required: typeof Schema.Boolean;
|
|
125
|
+
description: Schema.OptionFromNullOr<typeof Schema.String>;
|
|
126
|
+
}>>;
|
|
127
|
+
/** All decorator names on the method (for filtering) */
|
|
128
|
+
decorators: Schema.Array$<typeof Schema.String>;
|
|
129
|
+
/** Metadata from @ApiOperation decorator */
|
|
130
|
+
operation: Schema.Struct<{
|
|
131
|
+
/** Custom summary from @ApiOperation({ summary: '...' }) */
|
|
132
|
+
summary: Schema.OptionFromNullOr<typeof Schema.String>;
|
|
133
|
+
/** Description from @ApiOperation({ description: '...' }) */
|
|
134
|
+
description: Schema.OptionFromNullOr<typeof Schema.String>;
|
|
135
|
+
/** Custom operationId from @ApiOperation({ operationId: '...' }) */
|
|
136
|
+
operationId: Schema.OptionFromNullOr<typeof Schema.String>;
|
|
137
|
+
/** Deprecated flag from @ApiOperation({ deprecated: true }) */
|
|
138
|
+
deprecated: Schema.OptionFromNullOr<typeof Schema.Boolean>;
|
|
139
|
+
}>;
|
|
140
|
+
/** Response metadata from @ApiResponse decorators */
|
|
141
|
+
responses: Schema.Array$<Schema.Struct<{
|
|
142
|
+
/** HTTP status code (e.g., 200, 201, 400, 404) */
|
|
143
|
+
statusCode: typeof Schema.Number;
|
|
144
|
+
/** Response description */
|
|
145
|
+
description: Schema.OptionFromNullOr<typeof Schema.String>;
|
|
146
|
+
/** Response type name (e.g., "UserDto") */
|
|
147
|
+
type: Schema.OptionFromNullOr<typeof Schema.String>;
|
|
148
|
+
/** Whether the response type is an array */
|
|
149
|
+
isArray: typeof Schema.Boolean;
|
|
150
|
+
}>>;
|
|
151
|
+
/** Custom HTTP code from @HttpCode decorator */
|
|
152
|
+
httpCode: Schema.OptionFromNullOr<typeof Schema.Number>;
|
|
153
|
+
/** Content types from @ApiConsumes decorator (request body content types) */
|
|
154
|
+
consumes: Schema.Array$<typeof Schema.String>;
|
|
155
|
+
/** Content types from @ApiProduces decorator (response content types) */
|
|
156
|
+
produces: Schema.Array$<typeof Schema.String>;
|
|
157
|
+
/**
|
|
158
|
+
* Security requirements from decorators (@ApiBearerAuth, @ApiSecurity, etc.)
|
|
159
|
+
* Combines controller-level and method-level security.
|
|
160
|
+
* Multiple requirements = AND logic (all required).
|
|
161
|
+
* Empty array = no security decorators found (inherits global security).
|
|
162
|
+
*/
|
|
163
|
+
security: Schema.Array$<Schema.Struct<{
|
|
164
|
+
/** Security scheme name (e.g., 'bearer', 'jwt', 'oauth2') */
|
|
165
|
+
schemeName: typeof Schema.String;
|
|
166
|
+
/** Required scopes (empty array for schemes without scopes) */
|
|
167
|
+
scopes: Schema.Array$<typeof Schema.String>;
|
|
168
|
+
}>>;
|
|
169
|
+
}>;
|
|
170
|
+
type MethodInfo = typeof MethodInfo.Type;
|
|
171
|
+
interface OpenApiSchema {
|
|
172
|
+
readonly type?: string;
|
|
173
|
+
readonly format?: string;
|
|
174
|
+
readonly $ref?: string;
|
|
175
|
+
readonly oneOf?: readonly OpenApiSchema[];
|
|
176
|
+
readonly items?: OpenApiSchema;
|
|
177
|
+
readonly properties?: Record<string, OpenApiSchema>;
|
|
178
|
+
readonly required?: readonly string[];
|
|
179
|
+
}
|
|
180
|
+
declare const OpenApiOperation: Schema.Struct<{
|
|
181
|
+
operationId: typeof Schema.String;
|
|
182
|
+
summary: Schema.optional<typeof Schema.String>;
|
|
183
|
+
description: Schema.optional<typeof Schema.String>;
|
|
184
|
+
deprecated: Schema.optional<typeof Schema.Boolean>;
|
|
185
|
+
parameters: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
186
|
+
name: typeof Schema.String;
|
|
187
|
+
in: Schema.Literal<["path", "query", "header", "cookie"]>;
|
|
188
|
+
description: Schema.optional<typeof Schema.String>;
|
|
189
|
+
required: typeof Schema.Boolean;
|
|
190
|
+
schema: Schema.Schema<OpenApiSchema, OpenApiSchema, never>;
|
|
191
|
+
}>>>;
|
|
192
|
+
requestBody: Schema.optional<Schema.Struct<{
|
|
193
|
+
description: Schema.optional<typeof Schema.String>;
|
|
194
|
+
required: Schema.optional<typeof Schema.Boolean>;
|
|
195
|
+
content: Schema.Record$<typeof Schema.String, Schema.Struct<{
|
|
196
|
+
schema: typeof Schema.Unknown;
|
|
197
|
+
}>>;
|
|
198
|
+
}>>;
|
|
199
|
+
responses: Schema.Record$<typeof Schema.String, Schema.Struct<{
|
|
200
|
+
description: typeof Schema.String;
|
|
201
|
+
content: Schema.optional<Schema.Record$<typeof Schema.String, Schema.Struct<{
|
|
202
|
+
schema: typeof Schema.Unknown;
|
|
203
|
+
}>>>;
|
|
204
|
+
}>>;
|
|
205
|
+
tags: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
206
|
+
/** Per-operation security requirements */
|
|
207
|
+
security: Schema.optional<Schema.Array$<Schema.Record$<typeof Schema.String, Schema.Array$<typeof Schema.String>>>>;
|
|
208
|
+
}>;
|
|
209
|
+
type OpenApiOperation = typeof OpenApiOperation.Type;
|
|
210
|
+
/** Maps path -> method -> operation */
|
|
211
|
+
interface OpenApiPaths {
|
|
212
|
+
readonly [path: string]: {
|
|
213
|
+
readonly [method: string]: OpenApiOperation;
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
declare const OpenApiGeneratorConfig: Schema.Struct<{
|
|
217
|
+
extends: Schema.optional<typeof Schema.String>;
|
|
218
|
+
files: Schema.optional<Schema.Struct<{
|
|
219
|
+
entry: Schema.optional<Schema.Union<[typeof Schema.String, Schema.Array$<typeof Schema.String>]>>;
|
|
220
|
+
tsconfig: Schema.optional<typeof Schema.String>;
|
|
221
|
+
dtoGlob: Schema.optional<Schema.Union<[typeof Schema.String, Schema.Array$<typeof Schema.String>]>>;
|
|
222
|
+
include: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
223
|
+
exclude: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
224
|
+
}>>;
|
|
225
|
+
output: typeof Schema.String;
|
|
226
|
+
format: Schema.optional<Schema.Literal<["json", "yaml"]>>;
|
|
227
|
+
openapi: Schema.Struct<{
|
|
228
|
+
version: Schema.optional<Schema.Literal<["3.0.3", "3.1.0", "3.2.0"]>>;
|
|
229
|
+
info: Schema.Struct<{
|
|
230
|
+
title: typeof Schema.String;
|
|
231
|
+
version: typeof Schema.String;
|
|
232
|
+
description: Schema.optional<typeof Schema.String>;
|
|
233
|
+
contact: Schema.optional<Schema.Struct<{
|
|
234
|
+
name: Schema.optional<typeof Schema.String>;
|
|
235
|
+
email: Schema.optional<typeof Schema.String>;
|
|
236
|
+
url: Schema.optional<typeof Schema.String>;
|
|
237
|
+
}>>;
|
|
238
|
+
license: Schema.optional<Schema.Struct<{
|
|
239
|
+
name: typeof Schema.String;
|
|
240
|
+
url: Schema.optional<typeof Schema.String>;
|
|
241
|
+
}>>;
|
|
242
|
+
}>;
|
|
243
|
+
servers: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
244
|
+
url: typeof Schema.String;
|
|
245
|
+
description: Schema.optional<typeof Schema.String>;
|
|
246
|
+
}>>>;
|
|
247
|
+
tags: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
248
|
+
name: typeof Schema.String;
|
|
249
|
+
description: Schema.optional<typeof Schema.String>;
|
|
250
|
+
}>>>;
|
|
251
|
+
security: Schema.optional<Schema.Struct<{
|
|
252
|
+
schemes: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
253
|
+
name: typeof Schema.String;
|
|
254
|
+
type: Schema.Literal<["apiKey", "http", "oauth2", "openIdConnect"]>;
|
|
255
|
+
scheme: Schema.optional<typeof Schema.String>;
|
|
256
|
+
bearerFormat: Schema.optional<typeof Schema.String>;
|
|
257
|
+
in: Schema.optional<Schema.Literal<["query", "header", "cookie"]>>;
|
|
258
|
+
parameterName: Schema.optional<typeof Schema.String>;
|
|
259
|
+
description: Schema.optional<typeof Schema.String>;
|
|
260
|
+
}>>>;
|
|
261
|
+
global: Schema.optional<Schema.Array$<Schema.Record$<typeof Schema.String, Schema.Array$<typeof Schema.String>>>>;
|
|
262
|
+
}>>;
|
|
263
|
+
}>;
|
|
264
|
+
options: Schema.optional<Schema.Struct<{
|
|
265
|
+
basePath: Schema.optional<typeof Schema.String>;
|
|
266
|
+
extractValidation: Schema.optional<typeof Schema.Boolean>;
|
|
267
|
+
excludeDecorators: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
268
|
+
query: Schema.optional<Schema.Struct<{
|
|
269
|
+
style: Schema.optional<Schema.Literal<["inline", "ref"]>>;
|
|
270
|
+
}>>;
|
|
271
|
+
pathFilter: Schema.optional<Schema.Union<[Schema.instanceOf<RegExp>, Schema.declare<(path: string) => boolean, (path: string) => boolean, readonly [], never>]>>;
|
|
272
|
+
}>>;
|
|
273
|
+
}>;
|
|
274
|
+
type OpenApiGeneratorConfig = typeof OpenApiGeneratorConfig.Type;
|
|
275
|
+
declare const ResolvedConfig: Schema.Struct<{
|
|
276
|
+
tsconfig: typeof Schema.String;
|
|
277
|
+
entry: Schema.Array$<typeof Schema.String>;
|
|
278
|
+
include: Schema.Array$<typeof Schema.String>;
|
|
279
|
+
exclude: Schema.Array$<typeof Schema.String>;
|
|
280
|
+
excludeDecorators: Schema.Array$<typeof Schema.String>;
|
|
281
|
+
dtoGlob: Schema.Array$<typeof Schema.String>;
|
|
282
|
+
extractValidation: typeof Schema.Boolean;
|
|
283
|
+
basePath: Schema.optional<typeof Schema.String>;
|
|
284
|
+
pathFilter: Schema.optional<Schema.Union<[Schema.instanceOf<RegExp>, Schema.declare<(path: string) => boolean, (path: string) => boolean, readonly [], never>]>>;
|
|
285
|
+
version: Schema.optional<typeof Schema.String>;
|
|
286
|
+
info: Schema.Struct<{
|
|
287
|
+
title: typeof Schema.String;
|
|
288
|
+
version: typeof Schema.String;
|
|
289
|
+
description: Schema.optional<typeof Schema.String>;
|
|
290
|
+
contact: Schema.optional<Schema.Struct<{
|
|
291
|
+
name: Schema.optional<typeof Schema.String>;
|
|
292
|
+
email: Schema.optional<typeof Schema.String>;
|
|
293
|
+
url: Schema.optional<typeof Schema.String>;
|
|
294
|
+
}>>;
|
|
295
|
+
license: Schema.optional<Schema.Struct<{
|
|
296
|
+
name: typeof Schema.String;
|
|
297
|
+
url: Schema.optional<typeof Schema.String>;
|
|
298
|
+
}>>;
|
|
299
|
+
}>;
|
|
300
|
+
servers: Schema.Array$<Schema.Struct<{
|
|
301
|
+
url: typeof Schema.String;
|
|
302
|
+
description: Schema.optional<typeof Schema.String>;
|
|
303
|
+
}>>;
|
|
304
|
+
securitySchemes: Schema.Array$<Schema.Struct<{
|
|
305
|
+
name: typeof Schema.String;
|
|
306
|
+
type: Schema.Literal<["apiKey", "http", "oauth2", "openIdConnect"]>;
|
|
307
|
+
scheme: Schema.optional<typeof Schema.String>;
|
|
308
|
+
bearerFormat: Schema.optional<typeof Schema.String>;
|
|
309
|
+
in: Schema.optional<Schema.Literal<["query", "header", "cookie"]>>;
|
|
310
|
+
parameterName: Schema.optional<typeof Schema.String>;
|
|
311
|
+
description: Schema.optional<typeof Schema.String>;
|
|
312
|
+
}>>;
|
|
313
|
+
securityRequirements: Schema.Array$<Schema.Record$<typeof Schema.String, Schema.Array$<typeof Schema.String>>>;
|
|
314
|
+
tags: Schema.Array$<Schema.Struct<{
|
|
315
|
+
name: typeof Schema.String;
|
|
316
|
+
description: Schema.optional<typeof Schema.String>;
|
|
317
|
+
}>>;
|
|
318
|
+
output: typeof Schema.String;
|
|
319
|
+
format: Schema.Literal<["json", "yaml"]>;
|
|
320
|
+
}>;
|
|
321
|
+
type ResolvedConfig = typeof ResolvedConfig.Type;
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Internal Effect-based API
|
|
325
|
+
*
|
|
326
|
+
* This module exposes the Effect-based implementation for users who want
|
|
327
|
+
* to integrate with Effect-TS. For most users, the Promise-based API
|
|
328
|
+
* in the main module is recommended.
|
|
329
|
+
*/
|
|
330
|
+
|
|
331
|
+
interface GenerateOptions {
|
|
332
|
+
readonly tsconfig: string;
|
|
333
|
+
readonly entry: string;
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* Generate OpenAPI paths using Effect
|
|
337
|
+
*
|
|
338
|
+
* @example
|
|
339
|
+
* ```typescript
|
|
340
|
+
* import { Effect } from 'effect';
|
|
341
|
+
* import { generate } from 'nestjs-openapi/internal';
|
|
342
|
+
*
|
|
343
|
+
* const program = generate({
|
|
344
|
+
* tsconfig: './tsconfig.json',
|
|
345
|
+
* entry: './src/app.module.ts'
|
|
346
|
+
* });
|
|
347
|
+
*
|
|
348
|
+
* const paths = await Effect.runPromise(program);
|
|
349
|
+
* ```
|
|
350
|
+
*/
|
|
351
|
+
declare const generate: (options: GenerateOptions) => Effect.Effect<OpenApiPaths, ProjectError>;
|
|
352
|
+
declare const generateAsync: (options: GenerateOptions) => Promise<OpenApiPaths>;
|
|
353
|
+
|
|
354
|
+
export { ConfigNotFoundError as C, EntryNotFoundError as E, HttpMethod as H, InvalidMethodError as I, MethodInfo as M, OpenApiGeneratorConfig as O, ResolvedConfig as R, ProjectInitError as b, generateAsync as d, ParameterLocation as e, ResolvedParameter as f, generate as g, ReturnTypeInfo as h, ConfigLoadError as i, ConfigValidationError as j };
|
|
355
|
+
export type { AnalysisError as A, GenerateOptions as G, ProjectError as P, ConfigError as a, OpenApiPaths as c, GeneratorError as k };
|