Comments (5)
可尝试将TypeScript的编译选项”target“设置为ES6
如果TypeScript的编译选项"target"设置为ES5的话,类并不是使用class来实现。类的方法是通过Object.prototype来定义的匿名函数,这种情况下,function.name这个属性的值是个空字符串。导致swagger key值与装饰器生成的key值不一致。最终文档无法显示出来。
from koa-swagger-decorator.
同问,我也是ts下不显示定义的接口
from koa-swagger-decorator.
同问,我也是ts下不显示定义的接口
emitDecoratorMetadata我的关闭了这个选项就好了
from koa-swagger-decorator.
可以在 typescript 使用,但是通过 webpack 打成 bundle 后可能会跑不起来的,因为运行时 mapDir 会遍历目录去加载路由
from koa-swagger-decorator.
can't we use webpack then? Is there any alternate solutions available to use webpack & koa-swagger-decorator combinedly?
from koa-swagger-decorator.
Related Issues (20)
- No swagger doc shows when using export instead of export default HOT 1
- 参数校验失败,返回400和error, 是否可以自定义格式? HOT 2
- validator loses return value from next middleware
- 生产如何关闭swagger HOT 1
- Incorrect "main" file path in 1.8.1 HOT 1
- add response body example to responses HOT 1
- Check failure HOT 1
- date format should check 'yyyy-MM-dd' as stated in OpenAPI definition
- Add support for sorthing methods based on Request Type or alphabetically
- Add support for HEAD Request
- Controller resets on each request
- Can it support the array body?
- Can it support array body? HOT 1
- Could this support ESM when I set module 'ESNext' at tsconfig.json HOT 2
- SyntaxError: Invalid or unexpected token HOT 1
- tsconfig.json报错
- securityDefinitions 增加header属性不生效 HOT 1
- Swagger "spec" attribute is doing nothing. HOT 1
- too specific HOT 1
- 在最新的版本文档中未看到Authorize如何配置,请问这一块如何配置? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from koa-swagger-decorator.