-
Notifications
You must be signed in to change notification settings - Fork 80
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
[新需求]接口的resBody的jsonSchema放到生成的文件中,业务代码里可以用来校验接口 #49
Labels
enhancement
New feature or request
Comments
可以作为可选配置开启,开启则生成请求数据和返回数据的 json schema。 |
项目怎样调试啊,用vscode自带的调试功能可以吗 |
这种比较深入的需求我来实现吧 😀 没有调试 我都是写完写个测试 没问题就发版 |
那什么时候可以完成呢 |
已支持,试试最新版,一个配置示例: import { defineConfig } from 'yapi-to-typescript'
export default defineConfig({
serverUrl: 'https://petstore.swagger.io/v2/swagger.json',
serverType: 'swagger',
outputFilePath: 'api/index.ts',
jsonSchema: {
enabled: true,
},
projects: [
{
token: '',
categories: [
{
id: 0,
},
],
},
],
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
业务代码中校验接口,抛出错误,方便调试及测试
The text was updated successfully, but these errors were encountered: