Skip to content
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

projects配置项, 当id重复时, 可否都生成, 而不是只生成第一个 #8

Open
liuyingqq123 opened this issue Feb 15, 2019 · 1 comment

Comments

@liuyingqq123
Copy link

liuyingqq123 commented Feb 15, 2019

自动生成api时, 都生成在一个文件中了, 而实际开发时, 可能会按照业务分开多个api的js文件, 那么我看projects配置项可以配置多个, 我就在想, 可以用white来控制生成各种业务的api文件, 例如
"projects": [
{
"id": "5c64f9e9fbee5808a30312bc",
"name": "auth",
"white": [
"/auth"
]
},
{
"id": "5c64f9e9fbee5808a30312bc",
"name": "plat",
"white": [
"/plat"
]
}
]
但是发现, 这样配置, 只生成了auth, 并没有生成plat, 那更麻烦点可以解决这个问题, 我就需要创建多个个人项目, 关联同样的swagger, 这样配置项里的id就可以不同了, 但是这样解决显然特别麻烦, 想想, 一个项目如果有10个业务, 那么需要在easymock上创建10个冗余的项目, 为了获得不同的id.

能否请大神稍做修改, 支持projects里配置相同的id.

@liuyingqq123
Copy link
Author

我自己花两天时间解决了下这个问题, 请参考:
https://github.com/liuyingqq123/easy-mock-group-cli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant