nestjs-openapi 0.2.1 → 0.2.2
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/dist/cli.mjs +1 -1
- package/dist/index.d.mts +19 -19
- package/dist/index.d.ts +19 -19
- package/dist/index.mjs +2 -2
- package/dist/internal.d.mts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.mjs +1 -1
- package/dist/shared/{nestjs-openapi.0ft_UaiO.mjs → nestjs-openapi.DeikubMm.mjs} +1 -5
- package/dist/shared/{nestjs-openapi.C1csrdEX.d.mts → nestjs-openapi.NtbZNAvU.d.mts} +193 -193
- package/dist/shared/{nestjs-openapi.C1csrdEX.d.ts → nestjs-openapi.NtbZNAvU.d.ts} +193 -193
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import 'tsx';
|
|
3
3
|
import { Effect, Exit, Cause, Option } from 'effect';
|
|
4
|
-
import { ax as generateEffect, ak as generatorServicesLayer, az as runtimeLayerFor, aw as formatValidationResult } from './shared/nestjs-openapi.
|
|
4
|
+
import { ax as generateEffect, ak as generatorServicesLayer, az as runtimeLayerFor, aw as formatValidationResult } from './shared/nestjs-openapi.DeikubMm.mjs';
|
|
5
5
|
import minimist from 'minimist';
|
|
6
6
|
import { relative } from 'node:path';
|
|
7
7
|
import { createRequire } from 'node:module';
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as OpenApiSpec, S as SpecFileNotFoundError, a as SpecFileReadError, b as SpecFileParseError, M as MethodInfo, c as OpenApiPaths, d as OpenApiOperation, e as OpenApiPaths$1, G as GeneratedSchemas, f as OpenApiSchema,
|
|
2
|
-
export { a4 as AnalysisError, aJ as BrokenRef, aK as BrokenRefCategories, az as ClassValidationInfo, n as Config, a3 as ConfigError, X as ConfigLoadError, W as ConfigNotFoundError, Y as ConfigValidationError, o as ContactConfig, Z as DtoGlobResolutionError, U as EntryNotFoundError, E as GenerateOptions, s as GenerateOverrides, l as GenerateResult, a5 as GeneratorError, J as HttpMethod, I as InfoConfig, _ as InvalidMethodError, am as JsonSchema, L as LicenseConfig, $ as MissingGenericSchemaTempFileCleanupError, a0 as MissingGenericSchemaTempFileWriteError, ac as ModuleWithControllers, K as OpenApiGeneratorConfig, t as OpenApiOperation, u as OpenApiParameter, v as OpenApiRequestBody, w as OpenApiResponse, q as OutputFormat, F as ParameterLocation, a8 as ProjectContext, a2 as ProjectError, Q as ProjectInitError, a9 as ProjectOptions, a6 as ProjectServiceLive, ay as PropertyValidationInfo, a1 as PublicApiError, N as ResolvedConfig, R as ResolvedParameter, H as ReturnTypeInfo, ak as SchemaError, aj as SchemaGenerationError, al as SchemaGeneratorOptions, p as ServerConfig, T as TagConfig, r as TelemetryConfig, ax as ValidationConstraints, aI as ValidationResult, au as applyConstraintsToSchema, aG as categorizeBrokenRefs, m as defineConfig, as as extractClassConstraints, aq as extractClassValidationInfo, ar as extractClassValidationInfoEffect, an as extractPropertyConstraints, ap as extractPropertyValidationInfo, aA as findConfigFile, aH as formatValidationResult, k as generate, y as generateAsync, x as generateEffect, D as generateFromConfigAsync, B as generateFromConfigEffect, A as generatePathsAsync, z as generatePathsEffect, ah as generateSchemas, ai as generateSchemasFromFiles, ab as getAllControllers, af as getControllerMethodInfos, ag as getControllerMethodInfosEffect, ad as getMethodInfo, ae as getMethodInfoEffect, aa as getModules, at as getRequiredProperties, ao as isPropertyOptional, aE as loadAndResolveConfig, aC as loadConfig, aB as loadConfigFromFile, a7 as makeProjectContext, av as mergeValidationConstraints, aw as mergeValidationConstraintsEffect, aD as resolveConfig, aF as validateSpec } from './shared/nestjs-openapi.
|
|
1
|
+
import { O as OpenApiSpec, S as SpecFileNotFoundError, a as SpecFileReadError, b as SpecFileParseError, M as MethodInfo, c as OpenApiPaths, d as OpenApiOperation, e as OpenApiPaths$1, G as GeneratedSchemas, f as OpenApiSchema, g as OutputService, h as SchemaService, V as ValidationService, C as ConfigService, i as ModuleTraversalService, j as MethodExtractionService, P as ProjectService } from './shared/nestjs-openapi.NtbZNAvU.mjs';
|
|
2
|
+
export { a4 as AnalysisError, aJ as BrokenRef, aK as BrokenRefCategories, az as ClassValidationInfo, n as Config, a3 as ConfigError, X as ConfigLoadError, W as ConfigNotFoundError, Y as ConfigValidationError, o as ContactConfig, Z as DtoGlobResolutionError, U as EntryNotFoundError, E as GenerateOptions, s as GenerateOverrides, l as GenerateResult, a5 as GeneratorError, J as HttpMethod, I as InfoConfig, _ as InvalidMethodError, am as JsonSchema, L as LicenseConfig, $ as MissingGenericSchemaTempFileCleanupError, a0 as MissingGenericSchemaTempFileWriteError, ac as ModuleWithControllers, K as OpenApiGeneratorConfig, t as OpenApiOperation, u as OpenApiParameter, v as OpenApiRequestBody, w as OpenApiResponse, q as OutputFormat, F as ParameterLocation, a8 as ProjectContext, a2 as ProjectError, Q as ProjectInitError, a9 as ProjectOptions, a6 as ProjectServiceLive, ay as PropertyValidationInfo, a1 as PublicApiError, N as ResolvedConfig, R as ResolvedParameter, H as ReturnTypeInfo, ak as SchemaError, aj as SchemaGenerationError, al as SchemaGeneratorOptions, p as ServerConfig, T as TagConfig, r as TelemetryConfig, ax as ValidationConstraints, aI as ValidationResult, au as applyConstraintsToSchema, aG as categorizeBrokenRefs, m as defineConfig, as as extractClassConstraints, aq as extractClassValidationInfo, ar as extractClassValidationInfoEffect, an as extractPropertyConstraints, ap as extractPropertyValidationInfo, aA as findConfigFile, aH as formatValidationResult, k as generate, y as generateAsync, x as generateEffect, D as generateFromConfigAsync, B as generateFromConfigEffect, A as generatePathsAsync, z as generatePathsEffect, ah as generateSchemas, ai as generateSchemasFromFiles, ab as getAllControllers, af as getControllerMethodInfos, ag as getControllerMethodInfosEffect, ad as getMethodInfo, ae as getMethodInfoEffect, aa as getModules, at as getRequiredProperties, ao as isPropertyOptional, aE as loadAndResolveConfig, aC as loadConfig, aB as loadConfigFromFile, a7 as makeProjectContext, av as mergeValidationConstraints, aw as mergeValidationConstraintsEffect, aD as resolveConfig, aF as validateSpec } from './shared/nestjs-openapi.NtbZNAvU.mjs';
|
|
3
3
|
import { DynamicModule } from '@nestjs/common';
|
|
4
4
|
import { Effect, Option, Layer } from 'effect';
|
|
5
5
|
import { ClassDeclaration, MethodDeclaration, Decorator, Symbol, ObjectLiteralExpression, Expression } from 'ts-morph';
|
|
@@ -159,27 +159,23 @@ declare const getHttpDecorator: (method: MethodDeclaration) => Decorator | undef
|
|
|
159
159
|
|
|
160
160
|
declare const transformMethod: (methodInfo: MethodInfo) => OpenApiPaths;
|
|
161
161
|
declare const transformMethodEffect: (methodInfo: {
|
|
162
|
-
readonly security: readonly {
|
|
163
|
-
readonly scopes: readonly string[];
|
|
164
|
-
readonly schemeName: string;
|
|
165
|
-
}[];
|
|
166
162
|
readonly httpMethod: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD" | "ALL";
|
|
167
163
|
readonly path: string;
|
|
168
164
|
readonly methodName: string;
|
|
169
165
|
readonly controllerName: string;
|
|
170
166
|
readonly controllerTags: readonly string[];
|
|
171
167
|
readonly returnType: {
|
|
168
|
+
readonly filePath: Option.Option<string>;
|
|
172
169
|
readonly type: Option.Option<string>;
|
|
173
170
|
readonly inline: Option.Option<string>;
|
|
174
171
|
readonly container: Option.Option<"array">;
|
|
175
|
-
readonly filePath: Option.Option<string>;
|
|
176
172
|
};
|
|
177
173
|
readonly parameters: readonly {
|
|
178
174
|
readonly name: string;
|
|
179
|
-
readonly
|
|
180
|
-
readonly location: "query" | "header" | "cookie" | "path" | "body";
|
|
175
|
+
readonly location: "path" | "query" | "header" | "cookie" | "body";
|
|
181
176
|
readonly tsType: string;
|
|
182
177
|
readonly required: boolean;
|
|
178
|
+
readonly description: Option.Option<string>;
|
|
183
179
|
}[];
|
|
184
180
|
readonly decorators: readonly string[];
|
|
185
181
|
readonly operation: {
|
|
@@ -189,14 +185,18 @@ declare const transformMethodEffect: (methodInfo: {
|
|
|
189
185
|
readonly deprecated: Option.Option<boolean>;
|
|
190
186
|
};
|
|
191
187
|
readonly responses: readonly {
|
|
192
|
-
readonly description: Option.Option<string>;
|
|
193
188
|
readonly type: Option.Option<string>;
|
|
189
|
+
readonly description: Option.Option<string>;
|
|
194
190
|
readonly statusCode: number;
|
|
195
191
|
readonly isArray: boolean;
|
|
196
192
|
}[];
|
|
197
193
|
readonly httpCode: Option.Option<number>;
|
|
198
194
|
readonly consumes: readonly string[];
|
|
199
195
|
readonly produces: readonly string[];
|
|
196
|
+
readonly security: readonly {
|
|
197
|
+
readonly schemeName: string;
|
|
198
|
+
readonly scopes: readonly string[];
|
|
199
|
+
}[];
|
|
200
200
|
}) => Effect.Effect<OpenApiPaths, never, never>;
|
|
201
201
|
type MutableOpenApiPaths = {
|
|
202
202
|
[path: string]: {
|
|
@@ -205,27 +205,23 @@ type MutableOpenApiPaths = {
|
|
|
205
205
|
};
|
|
206
206
|
declare const transformMethods: (methodInfos: readonly MethodInfo[]) => OpenApiPaths;
|
|
207
207
|
declare const transformMethodsEffect: (methodInfos: readonly {
|
|
208
|
-
readonly security: readonly {
|
|
209
|
-
readonly scopes: readonly string[];
|
|
210
|
-
readonly schemeName: string;
|
|
211
|
-
}[];
|
|
212
208
|
readonly httpMethod: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD" | "ALL";
|
|
213
209
|
readonly path: string;
|
|
214
210
|
readonly methodName: string;
|
|
215
211
|
readonly controllerName: string;
|
|
216
212
|
readonly controllerTags: readonly string[];
|
|
217
213
|
readonly returnType: {
|
|
214
|
+
readonly filePath: Option.Option<string>;
|
|
218
215
|
readonly type: Option.Option<string>;
|
|
219
216
|
readonly inline: Option.Option<string>;
|
|
220
217
|
readonly container: Option.Option<"array">;
|
|
221
|
-
readonly filePath: Option.Option<string>;
|
|
222
218
|
};
|
|
223
219
|
readonly parameters: readonly {
|
|
224
220
|
readonly name: string;
|
|
225
|
-
readonly
|
|
226
|
-
readonly location: "query" | "header" | "cookie" | "path" | "body";
|
|
221
|
+
readonly location: "path" | "query" | "header" | "cookie" | "body";
|
|
227
222
|
readonly tsType: string;
|
|
228
223
|
readonly required: boolean;
|
|
224
|
+
readonly description: Option.Option<string>;
|
|
229
225
|
}[];
|
|
230
226
|
readonly decorators: readonly string[];
|
|
231
227
|
readonly operation: {
|
|
@@ -235,14 +231,18 @@ declare const transformMethodsEffect: (methodInfos: readonly {
|
|
|
235
231
|
readonly deprecated: Option.Option<boolean>;
|
|
236
232
|
};
|
|
237
233
|
readonly responses: readonly {
|
|
238
|
-
readonly description: Option.Option<string>;
|
|
239
234
|
readonly type: Option.Option<string>;
|
|
235
|
+
readonly description: Option.Option<string>;
|
|
240
236
|
readonly statusCode: number;
|
|
241
237
|
readonly isArray: boolean;
|
|
242
238
|
}[];
|
|
243
239
|
readonly httpCode: Option.Option<number>;
|
|
244
240
|
readonly consumes: readonly string[];
|
|
245
241
|
readonly produces: readonly string[];
|
|
242
|
+
readonly security: readonly {
|
|
243
|
+
readonly schemeName: string;
|
|
244
|
+
readonly scopes: readonly string[];
|
|
245
|
+
}[];
|
|
246
246
|
}[]) => Effect.Effect<MutableOpenApiPaths, never, never>;
|
|
247
247
|
|
|
248
248
|
/**
|
|
@@ -309,7 +309,7 @@ declare const normalizeStructureRefsEffect: (schemas: GeneratedSchemas) => Effec
|
|
|
309
309
|
/**
|
|
310
310
|
* Shared service dependency graph for generation pipelines.
|
|
311
311
|
*/
|
|
312
|
-
declare const generatorServicesLayer: Layer.Layer<
|
|
312
|
+
declare const generatorServicesLayer: Layer.Layer<OutputService | SchemaService | ValidationService | ConfigService | ModuleTraversalService | MethodExtractionService | ProjectService, never, never>;
|
|
313
313
|
|
|
314
314
|
/** Handles aliased symbols (re-exports) */
|
|
315
315
|
declare const resolveClassFromSymbol: (sym: Symbol) => Option.Option<ClassDeclaration>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as OpenApiSpec, S as SpecFileNotFoundError, a as SpecFileReadError, b as SpecFileParseError, M as MethodInfo, c as OpenApiPaths, d as OpenApiOperation, e as OpenApiPaths$1, G as GeneratedSchemas, f as OpenApiSchema,
|
|
2
|
-
export { a4 as AnalysisError, aJ as BrokenRef, aK as BrokenRefCategories, az as ClassValidationInfo, n as Config, a3 as ConfigError, X as ConfigLoadError, W as ConfigNotFoundError, Y as ConfigValidationError, o as ContactConfig, Z as DtoGlobResolutionError, U as EntryNotFoundError, E as GenerateOptions, s as GenerateOverrides, l as GenerateResult, a5 as GeneratorError, J as HttpMethod, I as InfoConfig, _ as InvalidMethodError, am as JsonSchema, L as LicenseConfig, $ as MissingGenericSchemaTempFileCleanupError, a0 as MissingGenericSchemaTempFileWriteError, ac as ModuleWithControllers, K as OpenApiGeneratorConfig, t as OpenApiOperation, u as OpenApiParameter, v as OpenApiRequestBody, w as OpenApiResponse, q as OutputFormat, F as ParameterLocation, a8 as ProjectContext, a2 as ProjectError, Q as ProjectInitError, a9 as ProjectOptions, a6 as ProjectServiceLive, ay as PropertyValidationInfo, a1 as PublicApiError, N as ResolvedConfig, R as ResolvedParameter, H as ReturnTypeInfo, ak as SchemaError, aj as SchemaGenerationError, al as SchemaGeneratorOptions, p as ServerConfig, T as TagConfig, r as TelemetryConfig, ax as ValidationConstraints, aI as ValidationResult, au as applyConstraintsToSchema, aG as categorizeBrokenRefs, m as defineConfig, as as extractClassConstraints, aq as extractClassValidationInfo, ar as extractClassValidationInfoEffect, an as extractPropertyConstraints, ap as extractPropertyValidationInfo, aA as findConfigFile, aH as formatValidationResult, k as generate, y as generateAsync, x as generateEffect, D as generateFromConfigAsync, B as generateFromConfigEffect, A as generatePathsAsync, z as generatePathsEffect, ah as generateSchemas, ai as generateSchemasFromFiles, ab as getAllControllers, af as getControllerMethodInfos, ag as getControllerMethodInfosEffect, ad as getMethodInfo, ae as getMethodInfoEffect, aa as getModules, at as getRequiredProperties, ao as isPropertyOptional, aE as loadAndResolveConfig, aC as loadConfig, aB as loadConfigFromFile, a7 as makeProjectContext, av as mergeValidationConstraints, aw as mergeValidationConstraintsEffect, aD as resolveConfig, aF as validateSpec } from './shared/nestjs-openapi.
|
|
1
|
+
import { O as OpenApiSpec, S as SpecFileNotFoundError, a as SpecFileReadError, b as SpecFileParseError, M as MethodInfo, c as OpenApiPaths, d as OpenApiOperation, e as OpenApiPaths$1, G as GeneratedSchemas, f as OpenApiSchema, g as OutputService, h as SchemaService, V as ValidationService, C as ConfigService, i as ModuleTraversalService, j as MethodExtractionService, P as ProjectService } from './shared/nestjs-openapi.NtbZNAvU.js';
|
|
2
|
+
export { a4 as AnalysisError, aJ as BrokenRef, aK as BrokenRefCategories, az as ClassValidationInfo, n as Config, a3 as ConfigError, X as ConfigLoadError, W as ConfigNotFoundError, Y as ConfigValidationError, o as ContactConfig, Z as DtoGlobResolutionError, U as EntryNotFoundError, E as GenerateOptions, s as GenerateOverrides, l as GenerateResult, a5 as GeneratorError, J as HttpMethod, I as InfoConfig, _ as InvalidMethodError, am as JsonSchema, L as LicenseConfig, $ as MissingGenericSchemaTempFileCleanupError, a0 as MissingGenericSchemaTempFileWriteError, ac as ModuleWithControllers, K as OpenApiGeneratorConfig, t as OpenApiOperation, u as OpenApiParameter, v as OpenApiRequestBody, w as OpenApiResponse, q as OutputFormat, F as ParameterLocation, a8 as ProjectContext, a2 as ProjectError, Q as ProjectInitError, a9 as ProjectOptions, a6 as ProjectServiceLive, ay as PropertyValidationInfo, a1 as PublicApiError, N as ResolvedConfig, R as ResolvedParameter, H as ReturnTypeInfo, ak as SchemaError, aj as SchemaGenerationError, al as SchemaGeneratorOptions, p as ServerConfig, T as TagConfig, r as TelemetryConfig, ax as ValidationConstraints, aI as ValidationResult, au as applyConstraintsToSchema, aG as categorizeBrokenRefs, m as defineConfig, as as extractClassConstraints, aq as extractClassValidationInfo, ar as extractClassValidationInfoEffect, an as extractPropertyConstraints, ap as extractPropertyValidationInfo, aA as findConfigFile, aH as formatValidationResult, k as generate, y as generateAsync, x as generateEffect, D as generateFromConfigAsync, B as generateFromConfigEffect, A as generatePathsAsync, z as generatePathsEffect, ah as generateSchemas, ai as generateSchemasFromFiles, ab as getAllControllers, af as getControllerMethodInfos, ag as getControllerMethodInfosEffect, ad as getMethodInfo, ae as getMethodInfoEffect, aa as getModules, at as getRequiredProperties, ao as isPropertyOptional, aE as loadAndResolveConfig, aC as loadConfig, aB as loadConfigFromFile, a7 as makeProjectContext, av as mergeValidationConstraints, aw as mergeValidationConstraintsEffect, aD as resolveConfig, aF as validateSpec } from './shared/nestjs-openapi.NtbZNAvU.js';
|
|
3
3
|
import { DynamicModule } from '@nestjs/common';
|
|
4
4
|
import { Effect, Option, Layer } from 'effect';
|
|
5
5
|
import { ClassDeclaration, MethodDeclaration, Decorator, Symbol, ObjectLiteralExpression, Expression } from 'ts-morph';
|
|
@@ -159,27 +159,23 @@ declare const getHttpDecorator: (method: MethodDeclaration) => Decorator | undef
|
|
|
159
159
|
|
|
160
160
|
declare const transformMethod: (methodInfo: MethodInfo) => OpenApiPaths;
|
|
161
161
|
declare const transformMethodEffect: (methodInfo: {
|
|
162
|
-
readonly security: readonly {
|
|
163
|
-
readonly scopes: readonly string[];
|
|
164
|
-
readonly schemeName: string;
|
|
165
|
-
}[];
|
|
166
162
|
readonly httpMethod: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD" | "ALL";
|
|
167
163
|
readonly path: string;
|
|
168
164
|
readonly methodName: string;
|
|
169
165
|
readonly controllerName: string;
|
|
170
166
|
readonly controllerTags: readonly string[];
|
|
171
167
|
readonly returnType: {
|
|
168
|
+
readonly filePath: Option.Option<string>;
|
|
172
169
|
readonly type: Option.Option<string>;
|
|
173
170
|
readonly inline: Option.Option<string>;
|
|
174
171
|
readonly container: Option.Option<"array">;
|
|
175
|
-
readonly filePath: Option.Option<string>;
|
|
176
172
|
};
|
|
177
173
|
readonly parameters: readonly {
|
|
178
174
|
readonly name: string;
|
|
179
|
-
readonly
|
|
180
|
-
readonly location: "query" | "header" | "cookie" | "path" | "body";
|
|
175
|
+
readonly location: "path" | "query" | "header" | "cookie" | "body";
|
|
181
176
|
readonly tsType: string;
|
|
182
177
|
readonly required: boolean;
|
|
178
|
+
readonly description: Option.Option<string>;
|
|
183
179
|
}[];
|
|
184
180
|
readonly decorators: readonly string[];
|
|
185
181
|
readonly operation: {
|
|
@@ -189,14 +185,18 @@ declare const transformMethodEffect: (methodInfo: {
|
|
|
189
185
|
readonly deprecated: Option.Option<boolean>;
|
|
190
186
|
};
|
|
191
187
|
readonly responses: readonly {
|
|
192
|
-
readonly description: Option.Option<string>;
|
|
193
188
|
readonly type: Option.Option<string>;
|
|
189
|
+
readonly description: Option.Option<string>;
|
|
194
190
|
readonly statusCode: number;
|
|
195
191
|
readonly isArray: boolean;
|
|
196
192
|
}[];
|
|
197
193
|
readonly httpCode: Option.Option<number>;
|
|
198
194
|
readonly consumes: readonly string[];
|
|
199
195
|
readonly produces: readonly string[];
|
|
196
|
+
readonly security: readonly {
|
|
197
|
+
readonly schemeName: string;
|
|
198
|
+
readonly scopes: readonly string[];
|
|
199
|
+
}[];
|
|
200
200
|
}) => Effect.Effect<OpenApiPaths, never, never>;
|
|
201
201
|
type MutableOpenApiPaths = {
|
|
202
202
|
[path: string]: {
|
|
@@ -205,27 +205,23 @@ type MutableOpenApiPaths = {
|
|
|
205
205
|
};
|
|
206
206
|
declare const transformMethods: (methodInfos: readonly MethodInfo[]) => OpenApiPaths;
|
|
207
207
|
declare const transformMethodsEffect: (methodInfos: readonly {
|
|
208
|
-
readonly security: readonly {
|
|
209
|
-
readonly scopes: readonly string[];
|
|
210
|
-
readonly schemeName: string;
|
|
211
|
-
}[];
|
|
212
208
|
readonly httpMethod: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD" | "ALL";
|
|
213
209
|
readonly path: string;
|
|
214
210
|
readonly methodName: string;
|
|
215
211
|
readonly controllerName: string;
|
|
216
212
|
readonly controllerTags: readonly string[];
|
|
217
213
|
readonly returnType: {
|
|
214
|
+
readonly filePath: Option.Option<string>;
|
|
218
215
|
readonly type: Option.Option<string>;
|
|
219
216
|
readonly inline: Option.Option<string>;
|
|
220
217
|
readonly container: Option.Option<"array">;
|
|
221
|
-
readonly filePath: Option.Option<string>;
|
|
222
218
|
};
|
|
223
219
|
readonly parameters: readonly {
|
|
224
220
|
readonly name: string;
|
|
225
|
-
readonly
|
|
226
|
-
readonly location: "query" | "header" | "cookie" | "path" | "body";
|
|
221
|
+
readonly location: "path" | "query" | "header" | "cookie" | "body";
|
|
227
222
|
readonly tsType: string;
|
|
228
223
|
readonly required: boolean;
|
|
224
|
+
readonly description: Option.Option<string>;
|
|
229
225
|
}[];
|
|
230
226
|
readonly decorators: readonly string[];
|
|
231
227
|
readonly operation: {
|
|
@@ -235,14 +231,18 @@ declare const transformMethodsEffect: (methodInfos: readonly {
|
|
|
235
231
|
readonly deprecated: Option.Option<boolean>;
|
|
236
232
|
};
|
|
237
233
|
readonly responses: readonly {
|
|
238
|
-
readonly description: Option.Option<string>;
|
|
239
234
|
readonly type: Option.Option<string>;
|
|
235
|
+
readonly description: Option.Option<string>;
|
|
240
236
|
readonly statusCode: number;
|
|
241
237
|
readonly isArray: boolean;
|
|
242
238
|
}[];
|
|
243
239
|
readonly httpCode: Option.Option<number>;
|
|
244
240
|
readonly consumes: readonly string[];
|
|
245
241
|
readonly produces: readonly string[];
|
|
242
|
+
readonly security: readonly {
|
|
243
|
+
readonly schemeName: string;
|
|
244
|
+
readonly scopes: readonly string[];
|
|
245
|
+
}[];
|
|
246
246
|
}[]) => Effect.Effect<MutableOpenApiPaths, never, never>;
|
|
247
247
|
|
|
248
248
|
/**
|
|
@@ -309,7 +309,7 @@ declare const normalizeStructureRefsEffect: (schemas: GeneratedSchemas) => Effec
|
|
|
309
309
|
/**
|
|
310
310
|
* Shared service dependency graph for generation pipelines.
|
|
311
311
|
*/
|
|
312
|
-
declare const generatorServicesLayer: Layer.Layer<
|
|
312
|
+
declare const generatorServicesLayer: Layer.Layer<OutputService | SchemaService | ValidationService | ConfigService | ModuleTraversalService | MethodExtractionService | ProjectService, never, never>;
|
|
313
313
|
|
|
314
314
|
/** Handles aliased symbols (re-exports) */
|
|
315
315
|
declare const resolveClassFromSymbol: (sym: Symbol) => Option.Option<ClassDeclaration>;
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SpecFileNotFoundError, a as SpecFileReadError, b as SpecFileParseError } from './shared/nestjs-openapi.
|
|
2
|
-
export { c as ConfigLoadError, C as ConfigNotFoundError, ae as ConfigService, e as ConfigValidationError, D as DtoGlobResolutionError, E as EntryNotFoundError, I as InvalidMethodError, B as MethodExtractionService, M as MissingGenericSchemaTempFileCleanupError, f as MissingGenericSchemaTempFileWriteError, n as ModuleTraversalService, ad as OutputService, P as ProjectInitError, i as ProjectService, j as ProjectServiceLive, h as PublicApiError, a0 as SchemaGenerationError, a1 as SchemaService, ac as ValidationService, a9 as applyConstraintsToSchema, av as categorizeBrokenRefs, d as defineConfig, a7 as extractClassConstraints, a5 as extractClassValidationInfo, a6 as extractClassValidationInfoEffect, a2 as extractPropertyConstraints, a4 as extractPropertyValidationInfo, V as filterInternalSchemas, W as filterInternalSchemasEffect, Q as filterSchemas, R as filterSchemasEffect, af as findConfigFile, aw as formatValidationResult, g as generate, _ as generateSchemas, $ as generateSchemasFromFiles, ak as generatorServicesLayer, l as getAllControllers, am as getArrayInitializer, z as getControllerMethodInfos, A as getControllerMethodInfosEffect, p as getControllerName, o as getControllerPrefix, t as getControllerTags, s as getDecoratorName, u as getHttpDecorator, r as getHttpMethods, x as getMethodInfo, y as getMethodInfoEffect, aq as getModuleDecoratorArg, at as getModuleMetadata, k as getModules, a8 as getRequiredProperties, an as getStringLiteralValue, ao as getSymbolFromIdentifier, v as isHttpDecorator, q as isHttpMethod, ap as isModuleClass, a3 as isPropertyOptional, aj as loadAndResolveConfig, ah as loadConfig, ag as loadConfigFromFile, m as makeProjectContext, N as mergeGeneratedSchemas, O as mergeGeneratedSchemasEffect, K as mergeSchemas, L as mergeSchemasEffect, aa as mergeValidationConstraints, ab as mergeValidationConstraintsEffect, w as normalizePath, T as normalizeSchemas, U as normalizeSchemasEffect, X as normalizeStructureRefs, Y as normalizeStructureRefsEffect, as as resolveArrayOfClasses, ar as resolveClassFromExpression, al as resolveClassFromSymbol, ai as resolveConfig, Z as toPascalCase, F as transformMethod, G as transformMethodEffect, H as transformMethods, J as transformMethodsEffect, au as validateSpec } from './shared/nestjs-openapi.
|
|
1
|
+
import { S as SpecFileNotFoundError, a as SpecFileReadError, b as SpecFileParseError } from './shared/nestjs-openapi.DeikubMm.mjs';
|
|
2
|
+
export { c as ConfigLoadError, C as ConfigNotFoundError, ae as ConfigService, e as ConfigValidationError, D as DtoGlobResolutionError, E as EntryNotFoundError, I as InvalidMethodError, B as MethodExtractionService, M as MissingGenericSchemaTempFileCleanupError, f as MissingGenericSchemaTempFileWriteError, n as ModuleTraversalService, ad as OutputService, P as ProjectInitError, i as ProjectService, j as ProjectServiceLive, h as PublicApiError, a0 as SchemaGenerationError, a1 as SchemaService, ac as ValidationService, a9 as applyConstraintsToSchema, av as categorizeBrokenRefs, d as defineConfig, a7 as extractClassConstraints, a5 as extractClassValidationInfo, a6 as extractClassValidationInfoEffect, a2 as extractPropertyConstraints, a4 as extractPropertyValidationInfo, V as filterInternalSchemas, W as filterInternalSchemasEffect, Q as filterSchemas, R as filterSchemasEffect, af as findConfigFile, aw as formatValidationResult, g as generate, _ as generateSchemas, $ as generateSchemasFromFiles, ak as generatorServicesLayer, l as getAllControllers, am as getArrayInitializer, z as getControllerMethodInfos, A as getControllerMethodInfosEffect, p as getControllerName, o as getControllerPrefix, t as getControllerTags, s as getDecoratorName, u as getHttpDecorator, r as getHttpMethods, x as getMethodInfo, y as getMethodInfoEffect, aq as getModuleDecoratorArg, at as getModuleMetadata, k as getModules, a8 as getRequiredProperties, an as getStringLiteralValue, ao as getSymbolFromIdentifier, v as isHttpDecorator, q as isHttpMethod, ap as isModuleClass, a3 as isPropertyOptional, aj as loadAndResolveConfig, ah as loadConfig, ag as loadConfigFromFile, m as makeProjectContext, N as mergeGeneratedSchemas, O as mergeGeneratedSchemasEffect, K as mergeSchemas, L as mergeSchemasEffect, aa as mergeValidationConstraints, ab as mergeValidationConstraintsEffect, w as normalizePath, T as normalizeSchemas, U as normalizeSchemasEffect, X as normalizeStructureRefs, Y as normalizeStructureRefsEffect, as as resolveArrayOfClasses, ar as resolveClassFromExpression, al as resolveClassFromSymbol, ai as resolveConfig, Z as toPascalCase, F as transformMethod, G as transformMethodEffect, H as transformMethods, J as transformMethodsEffect, au as validateSpec } from './shared/nestjs-openapi.DeikubMm.mjs';
|
|
3
3
|
import { readFileSync } from 'node:fs';
|
|
4
4
|
import { fail } from 'node:assert';
|
|
5
5
|
import { resolve } from 'node:path';
|
package/dist/internal.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { E as GenerateOptions, x as generate, y as generateAsync, D as generateFromConfigAsync, B as generateFromConfigEffect, A as generatePathsAsync, z as generatePathsEffect } from './shared/nestjs-openapi.
|
|
1
|
+
export { E as GenerateOptions, x as generate, y as generateAsync, D as generateFromConfigAsync, B as generateFromConfigEffect, A as generatePathsAsync, z as generatePathsEffect } from './shared/nestjs-openapi.NtbZNAvU.mjs';
|
|
2
2
|
import 'effect';
|
|
3
3
|
import 'ts-morph';
|
package/dist/internal.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { E as GenerateOptions, x as generate, y as generateAsync, D as generateFromConfigAsync, B as generateFromConfigEffect, A as generatePathsAsync, z as generatePathsEffect } from './shared/nestjs-openapi.
|
|
1
|
+
export { E as GenerateOptions, x as generate, y as generateAsync, D as generateFromConfigAsync, B as generateFromConfigEffect, A as generatePathsAsync, z as generatePathsEffect } from './shared/nestjs-openapi.NtbZNAvU.js';
|
|
2
2
|
import 'effect';
|
|
3
3
|
import 'ts-morph';
|
package/dist/internal.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Effect } from 'effect';
|
|
2
|
-
import { i as ProjectService, n as ModuleTraversalService, B as MethodExtractionService, J as transformMethodsEffect, ax as generateEffect, ay as runProjectApiPromise, ak as generatorServicesLayer, az as runtimeLayerFor, aA as runGeneratorApiPromise } from './shared/nestjs-openapi.
|
|
2
|
+
import { i as ProjectService, n as ModuleTraversalService, B as MethodExtractionService, J as transformMethodsEffect, ax as generateEffect, ay as runProjectApiPromise, ak as generatorServicesLayer, az as runtimeLayerFor, aA as runGeneratorApiPromise } from './shared/nestjs-openapi.DeikubMm.mjs';
|
|
3
3
|
import 'node:fs';
|
|
4
4
|
import 'node:path';
|
|
5
5
|
import 'node:crypto';
|
|
@@ -2170,10 +2170,7 @@ const transformParameter = (param) => {
|
|
|
2170
2170
|
return {
|
|
2171
2171
|
name: param.name,
|
|
2172
2172
|
in: getParameterLocation(param.location),
|
|
2173
|
-
description:
|
|
2174
|
-
param.description,
|
|
2175
|
-
() => `${param.location} parameter: ${param.name}`
|
|
2176
|
-
),
|
|
2173
|
+
...Option.isSome(param.description) ? { description: param.description.value } : {},
|
|
2177
2174
|
required: param.location === "path" ? true : param.required,
|
|
2178
2175
|
schema
|
|
2179
2176
|
};
|
|
@@ -2293,7 +2290,6 @@ const transformMethodInternal = (methodInfo) => {
|
|
|
2293
2290
|
const parameters = nonBodyParams.map(transformParameter);
|
|
2294
2291
|
const requestContentTypes = getRequestContentTypes(methodInfo);
|
|
2295
2292
|
const requestBody = bodyParams.length > 0 ? {
|
|
2296
|
-
description: `Request body parameter: ${bodyParams[0].name}`,
|
|
2297
2293
|
required: bodyParams[0].required && !isInlineOptionalBodyType(bodyParams[0].tsType),
|
|
2298
2294
|
content: buildContentObject(
|
|
2299
2295
|
requestContentTypes,
|