-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
希望有一个关于axios模板的完整demo示例 #318
Comments
你有完整的demo 吗 |
没有, 代码没看懂理解能力太差, 自己根据公司实际情况从头做了个 |
@PeyFon 我昨天下班前弄好了 |
我的实践 重写下面这几个方法 基本实现 自定义输出 代码片段,入口收集 导出 /** 获取接口实现内容的代码 */
getInterfaceContent()
/** 获取单个模块的 index 入口文件 */
getModIndex()
/** 获取所有模块的 index 入口文件 */
getModsIndex() 但是遇到一个问题 下面的方法 在 export class MyFileStructures extends FileStructures {
getParamsCode(className = 'Params', surrounding = Surrounding.typeScript) {
return `interface ${className} {
${this.parameters
.filter(param => param.in === 'path' || param.in === 'query')
.map(param => param.toPropertyCode(surrounding, true))
.join('')}
}
`
}
} |
有链接吗 |
没有, 不是仅用swagger去生成的,由于后端技术栈不一样 几乎不能复用 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Background(背景)
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
希望有个完整示例,即使是需要自定义的地方也加个示例而不是留下一块空白。对于新手菜鸟有些不太友好。
The text was updated successfully, but these errors were encountered: