Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/YMFE/yapi
Browse files Browse the repository at this point in the history
  • Loading branch information
苏文雄 committed Feb 11, 2020
2 parents dc471de + c3da402 commit c2f2df8
Showing 1 changed file with 15 additions and 2 deletions.
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

0 comments on commit c2f2df8

Please sign in to comment.