StrongLoop API Explorer返回一个错误
StrongLoop API Explorer returning an error
我刚刚尝试使用StrongLoop API浏览器解释http://docs.strongloop.com/display/LB/Use+API+Explorer;从从https://github.com/strongloop/loopback-explorer下载样例代码开始,我遵循了文档中指示的所有步骤。
当我点击"Try it out"时,我一直得到一个JS错误(来自firebug)
TypeError: this.type.split is not a function
http://localhost:3000/explorer/lib/shred.bundle.js
Line 2034
,下面是我一直得到的响应体
{
"error": {
"name": "ValidationError",
"status": 422,
"message": "The `Person` instance is not valid. Details: `FirstName` can't be blank; `LastName` can't be blank; `Age` can't be blank; `DOB` can't be blank.",
"statusCode": 422,
"details": {
"context": "Person",
"codes": {
"FirstName": [
"presence"
],
"LastName": [
"presence"
],
"Age": [
"presence"
],
"DOB": [
"presence"
]
},
"messages": {
"FirstName": [
"can't be blank"
],
"LastName": [
"can't be blank"
],
"Age": [
"can't be blank"
],
"DOB": [
"can't be blank"
]
}
},
"stack": "ValidationError: The `Person` instance is not valid. Details: `FirstName` can't be blank; `LastName` can't be blank; `Age` can't be blank; `DOB` can't be blank.'n at D:''explorerAPI''node_modules''loopback-datasource-juggler''lib''dao.js:156:16'n at ModelConstructor.<anonymous> (D:''explorerAPI''node_modules''loopback-datasource-juggler''lib''validations.js:453:11)'n at ModelConstructor.next (D:''explorerAPI''node_modules''loopback-datasource-juggler''lib''hooks.js:66:12)'n at ModelConstructor.<anonymous> (D:''explorerAPI''node_modules''loopback-datasource-juggler''lib''validations.js:450:23)'n at ModelConstructor.trigger (D:''explorerAPI''node_modules''loopback-datasource-juggler''lib''hooks.js:56:12)'n at ModelConstructor.Validatable.isValid (D:''explorerAPI''node_modules''loopback-datasource-juggler''lib''validations.js:430:8)'n at Function.DataAccessObject.create (D:''explorerAPI''node_modules''loopback-datasource-juggler''lib''dao.js:152:7)'n at SharedMethod.invoke (D:''explorerAPI''node_modules''loopback''node_modules''strong-remoting''lib''shared-method.js:207:17)'n at HttpContext.invoke (D:''explorerAPI''node_modules''loopback''node_modules''strong-remoting''lib''http-context.js:243:12)'n at D:''explorerAPI''node_modules''loopback''node_modules''strong-remoting''lib''remote-objects.js:475:9"
}}
如果您能帮忙解决这个问题,我将不胜感激。
提前感谢
这是由https://github.com/wordnik/swagger-js/issues/107引起的回归。我们正在研究一个解决方法:https://github.com/strongloop/loopback-explorer/pull/29。
相关文章:
- 我怎么能把一个错误当作未捕获的错误来记录呢
- 在这个使用hasOwnProperty的对象扩展程序中有一个错误,I'我不确定那个bug是什么,也不确定这个扩展
- javascript window.location在检查firebug时给了我一个错误的url路径
- new SharedWorker(“whatever.js”)返回一个错误
- JSON.parse给了我一个错误,但JSONLint说它'是一个有效的json
- 有人能向我解释一下我犯的一个错误吗
- Jasmine:测试setTimeout函数会抛出一个错误
- JavaScript中的一个错误
- 为什么jqPlot显示了一个错误的饼图,其中包含通过AJAX检索的数据
- Webrtc和socket.io:createanswer()总是有一个错误.为什么?我的代码连接了两个对等体,但其中只
- 使用 jQuery 构建一个元素会给我一个错误
- Chai 期望 [函数] 抛出一个(错误)未通过测试(使用 Node)
- 在我的 jquery 函数中得到一个错误
- Addeventlistener 已转换为 IE.也许是另一个错误
- 我有一个错误,由于某种原因,号码被更改了,而不是名字
- 我无法建立离子机器人项目..它给了我一个错误:生成cmd enont
- JQueryAJAX调用:304 respose产生一个错误
- 继续得到一个错误,即某个东西不是函数,但找不到原因
- jQuerylib会导致一个错误,直到刷新为止
- HTML图像加载触发一个错误