[Feature request] midway3有两个关于swagger的需求,ApiExtraModel 对应助手函数和 type 字段的循环依赖支持异步,希望官方支持
#4479
yuntian001
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The feature, motivation(功能、动机)
1、 ApiExtraModel 的助手函数支持,或创建相似装饰器,可以放在自身类上。
Cat用getSchemaPath(Cat),用咱现在的方式必须如下解决CreateCatDto上定义@ApiExtraModel(Cat),重复工作太多想实现如下效果2、比如 type 字段的循环依赖支持异步函数。
@ApiProperty({ type: () => Photo})会造成循环import,想使用@ApiProperty({ type: async () => (await import('./photo.js')).Photo})规避掉这个问题Alternatives(替代方案)
No response
Additional context(其他上下文)
No response
Beta Was this translation helpful? Give feedback.
All reactions