首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >使用wso2应用编程接口管理器大容量导入swagger文件

使用wso2应用编程接口管理器大容量导入swagger文件
EN

Stack Overflow用户
提问于 2018-05-23 15:10:37
回答 2查看 212关注 0票数 1

我想知道是否有可能在wso2 api manager中自动化导入swagger文件的过程。如果是这样的话,怎么做呢?

谢谢

EN

回答 2

Stack Overflow用户

发布于 2018-05-24 18:24:26

您可以编写一个脚本来使用Publisher的API创建API。

您可以添加资源,包括作用域,作为Swagger有效负载。

https://docs.wso2.com/display/AM210/Publisher+APIs#PublisherAPIs-AddAPI

代码语言:javascript
运行
复制
curl -X POST -b cookies http://localhost:9763/publisher/site/blocks/item-add/ajax/add.jag -d "action=addAPI&name=PhoneVerification&context=/phoneverify&version=1.0.0&visibility=public&thumbUrl=&description=Verify a phone number&tags=phone,mobile,multimedia&endpointType=nonsecured&tiersCollection=Gold,Bronze&http_checked=http&https_checked=https&resourceCount=0&resourceMethod-0=GET&resourceMethodAuthType-0=Application&resourceMethodThrottlingTier-0=Unlimited&uriTemplate-0=/*&default_version_checked=default_version&bizOwner=xx&bizOwnerMail=xx@ee.com&techOwner=xx&techOwnerMail=ggg@ww.com" -d 'endpoint_config={"production_endpoints":{"url":" http://ws.cdyne.com/phoneverify/phoneverify.asmx","config":null},"endpoint_type":"http "}'
票数 0
EN

Stack Overflow用户

发布于 2018-06-05 19:49:52

您可以编写一个java/python客户端或创建一个脚本,该脚本将包含对publisher api document中提到的API的两个命中。

使用作用域的状态:使用Change API StatusUpdate swagger definition

  • Change API- apim:api_create apim:api_view apim:api_publish

  • Call设置为Publish
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50481988

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档