vona-module-a-web 5.0.17 → 5.0.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/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { appMetadata, BeanInfo, BeanBase, appResource, deepExtend, compose, cast
|
|
|
2
2
|
import * as ModuleInfo from '@cabloy/module-info';
|
|
3
3
|
import { Bean, Service, Scope } from 'vona-module-a-bean';
|
|
4
4
|
import { SymbolUseOnionOptions } from 'vona-module-a-onion';
|
|
5
|
-
import { SymbolRouteHandlersArgumentsValue, SymbolRouteHandlersArgumentsMeta,
|
|
5
|
+
import { SymbolRouteHandlersArgumentsValue, SymbolRouteHandlersArgumentsMeta, mergeFieldsOpenapiMetadata } from 'vona-module-a-openapi';
|
|
6
6
|
import { valid } from 'vona-module-a-validation';
|
|
7
7
|
import { SymbolUploadValue } from 'vona-module-a-upload';
|
|
8
8
|
import http from 'node:http';
|
|
@@ -532,15 +532,15 @@ function Controller(path, options) {
|
|
|
532
532
|
if (option !== undefined) optionsMeta[key] = option;
|
|
533
533
|
}
|
|
534
534
|
// IOpenApiOptions
|
|
535
|
-
|
|
535
|
+
mergeActionsOpenapiMetadata(target);
|
|
536
536
|
});
|
|
537
537
|
}
|
|
538
538
|
function Dto(options) {
|
|
539
539
|
return createBeanDecorator('dto', options, false, false, target => {
|
|
540
|
-
|
|
540
|
+
mergeFieldsOpenapiMetadata(target);
|
|
541
541
|
});
|
|
542
542
|
}
|
|
543
|
-
function
|
|
543
|
+
function mergeActionsOpenapiMetadata(target) {
|
|
544
544
|
// beanOptions
|
|
545
545
|
const beanOptions = appResource.getBean(target);
|
|
546
546
|
const actions = cast(beanOptions?.options)?.actions;
|
|
@@ -611,4 +611,4 @@ function $apiPathAndCombineParamsAndQuery(path, options) {
|
|
|
611
611
|
return combineParamsAndQuery(path, options);
|
|
612
612
|
}
|
|
613
613
|
|
|
614
|
-
export { $apiPath, $apiPathAndCombineParamsAndQuery, BeanRouter, Controller, Dto, Main, RequestMapping, ScopeModuleAWeb, ServiceWeb, StartupListen, SymbolRequestMappingHandler, Web, config,
|
|
614
|
+
export { $apiPath, $apiPathAndCombineParamsAndQuery, BeanRouter, Controller, Dto, Main, RequestMapping, ScopeModuleAWeb, ServiceWeb, StartupListen, SymbolRequestMappingHandler, Web, config, mergeActionsOpenapiMetadata };
|
|
@@ -4,4 +4,4 @@ import type { IDecoratorDtoOptions } from '../../types/dto.ts';
|
|
|
4
4
|
export declare function Controller<T extends IDecoratorControllerOptions>(options?: T): ClassDecorator;
|
|
5
5
|
export declare function Controller<T extends IDecoratorControllerOptions>(path?: string, options?: Omit<T, 'path'>): ClassDecorator;
|
|
6
6
|
export declare function Dto<T extends IDecoratorDtoOptions<any>>(options?: Omit<T, '_fieldsMore_'>): ClassDecorator;
|
|
7
|
-
export declare function
|
|
7
|
+
export declare function mergeActionsOpenapiMetadata(target: Constructable): void;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { OmitNever } from 'vona';
|
|
2
|
-
import type { ServiceOnion } from 'vona-module-a-onion';
|
|
3
|
-
import type { IOnionOptionsEnable } from 'vona-module-a-onion';
|
|
2
|
+
import type { ServiceOnion, TypeOnionOptionsEnableSimple } from 'vona-module-a-onion';
|
|
4
3
|
export interface IApiPathRecordMethodMap {
|
|
5
4
|
get: IApiPathGetRecord;
|
|
6
5
|
post: IApiPathPostRecord;
|
|
@@ -22,7 +21,7 @@ export interface IApiPathPatchRecord {
|
|
|
22
21
|
}
|
|
23
22
|
export interface IControllerRecord {
|
|
24
23
|
}
|
|
25
|
-
export interface IDecoratorControllerOptions extends
|
|
24
|
+
export interface IDecoratorControllerOptions extends TypeOnionOptionsEnableSimple {
|
|
26
25
|
path?: string;
|
|
27
26
|
exclude?: boolean;
|
|
28
27
|
tags?: string[];
|
package/dist/types/dto.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { OmitNever } from 'vona';
|
|
2
2
|
import type { ServiceOnion } from 'vona-module-a-onion';
|
|
3
|
-
import type {
|
|
3
|
+
import type { TypeOpenapiMetadata } from 'vona-module-a-openapi';
|
|
4
4
|
export interface IDtoRecord {
|
|
5
5
|
}
|
|
6
6
|
export interface IDecoratorDtoOptions<FieldsMore = never> {
|
|
7
7
|
independent?: boolean;
|
|
8
|
-
openapi?:
|
|
8
|
+
openapi?: TypeOpenapiMetadata;
|
|
9
9
|
_fieldsMore_?: FieldsMore;
|
|
10
10
|
}
|
|
11
11
|
declare module 'vona-module-a-onion' {
|