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

docs(sm2tsservice): 更新 sm2tsservice 3.2.0及以后版本的使用配置 #1611

Merged
merged 1 commit into from
Feb 11, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions exts/yapi-plugin-gen-services/Services/Services.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,20 @@ export default class Services extends Component {
<pre>{`
npm i sm2tsservice -D
`}</pre>
<h5>配置</h5>
<h5>配置【3.2.0及以上版本】</h5>
<pre>{`
touch json2service.json
`}</pre>
<pre>{`
{
"url": "yapi-swagger.json",
"remoteUrl": "${location.protocol}//${location.hostname}${location.port ? `:${location.port}` : ''}/api/open/plugin/export-full?type=json&pid=${id}&status=all&token=${this.props.token}",
"type": "yapi",
"swaggerParser": {}
}
`}
</pre>
<h5>配置【3.2.0以下版本】</h5>
<pre>{`
touch json2service.json
`}</pre>
Expand All @@ -52,7 +65,7 @@ export default class Services extends Component {
</pre>
<h5>生成services代码</h5>
<pre>{`
sm2tsservice --clear
(./node_modules/.bin/)sm2tsservice --clear
`}</pre>
</div>
<a href="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/gogoyqj/sm2tsservice">更多说明 sm2tsservice</a>
Expand Down