首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >WSO2更新swagger发布的应用编程接口

WSO2更新swagger发布的应用编程接口
EN

Stack Overflow用户
提问于 2016-10-26 18:01:17
回答 1查看 265关注 0票数 2

我正在尝试用这个卷曲来更新一个已发布的APi的夸张:

代码语言:javascript
运行
复制
curl -X POST -b cookies "http://localhost:9763/publisher/site/blocks/item-add/ajax/add.jag" -d 'action=updateAPI&name=datumvalidatie&provider=admin&version=1.0.0&visibility=public&thumbUrl=&description=test&tags=validation&endpointType=nonsecured&tiersCollection=Gold,Bronze&http_checked=http&https_checked=https' -d 'endpoint_config={"production_endpoints":{"url":"https://www.test.com/datumvalidatieWebApi/api","config":null},"endpoint_type":"http"}' -d 'swagger={"basePath" : "/DatumvalidatieWebApi", "paths" : {"/perioden/ingangsdatum" : {"get": {"summary" : "test", "x-auth-type": "Application \u0026 Application User", "deprecated" : false, "produces" : ["application/json", "text/json", "application/xml", "text/xml"], "operationId" : "Ingangsdatum_Get", "responses" :  {"200": {"schema" : {"$ref": "#/definitions/Periode"}, "description": "OK"}, "400" : {"schema" : {"type": "array", "items" : {"$ref" : "#/definitions/Object"}}, "description" : "BadRequest"}},  "x-throttling-tier" : "Unlimited", "tags" : ["Ingangsdatum"], "consumes": []}}}, "host" : "*******", "schemes" : ["http"], "definitions" : {"Periode" : {"description" : "Een periode", "type" : "object", "properties" : {"DatumVan " : {"format" : "date-time", "type" : "string"}, "DatumTot" : {"format" : "date-time", "type" : "string"}}}, "Object" : {"type" : "object", "properties" : {}}}, "swagger" : "2.0", "info" : {"description" : "Een collectie methoden om datumvalidaties uit te voeren.", "title" : "datumvalidatie", "version" : "1.0.0"}}'

我得到的回应是:

代码语言:javascript
运行
复制
"error" : true, "message" : "timeout"

curl: (6) Could not resolve host: \u0026

curl: (6) Could not resolve host: Application

curl: (3) [globbing] bad range in column 43

curl: (3) [globbing] unmatched brace in column 38

curl: (3) [globbing] unmatched close brace/bracket in column 85

curl: (6) Could not resolve host: collectie

curl: (6) Could not resolve host: methoden

......

有人知道我怎么解决这个问题吗?

EN

回答 1

Stack Overflow用户

发布于 2016-10-27 01:04:58

当我在拨打服务电话之前没有登录时,我观察到了这个错误。在发送上述curl请求之前,您是否已登录?如果没有,请先像这样登录。

代码语言:javascript
运行
复制
curl -X POST -c cookies http://localhost:9763/publisher/site/blocks/user/login/ajax/login.jag -d 'action=login&username=admin&password=admin' 

这是在REST API doc的顶部提到的。

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

https://stackoverflow.com/questions/40259229

复制
相关文章

相似问题

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