当我尝试使用https服务器部署我的技能时,我无法使用alexa-cli工具(https://www.npmjs.com/package/ask-cli)部署alexa技能
作为一个错误,我得到了:
◞ Creating new skill...Call create-skill error.
Error code: 400
{
"message": "Skill manifest is not valid.",
"violations": [
{
"message": "No default regionalized endpoint is defined."
}
]
}我使用了一个来自:https://github.com/alexa/skill-sample-nodejs-hello-world/blob/master/skill.json的示例skill.json
一个问题是如何添加自定义uri端点。我不想在AWS lambda函数中托管我的技能。
我尝试遵循文档:https://developer.amazon.com/de/docs/smapi/ask-cli-command-reference.html,但我不知道我做错了什么……
有人能看看我的json和alexa-cli文档吗?为什么我收到这么奇怪的消息?
"No default regionalized endpoint is defined."{
"manifest": {
"publishingInformation": {
"locales": {
"en-US": {
"summary": "Sample Short Description",
"examplePhrases": [
"Alexa open hello world",
"Alexa tell hello world my name is bill",
"Alexa tell hello world I want to play"
],
"name": "trivia",
"description": "Sample Full Description"
}
},
"isAvailableWorldwide": true,
"testingInstructions": "Sample Testing Instructions.",
"category": "KNOWLEDGE_AND_TRIVIA",
"distributionCountries": []
},
"apis": {
"custom": {
"endpoint": {
"sourceDir": "./lambda/custom",
"uri": "https://customapi.sampleskill.com",
" sslCertificateType": "Wildcard"
},
"regions": {
"EU": {
"endpoint": {
"uri": "https://customapi.sampleskill.com",
"sslCertificateType": "Trusted"
}
}
}
}
},
"manifestVersion": "1.0"
}
}发布于 2018-04-27 06:49:42
对于将来遇到这个问题的人来说,Ok ;)重要的是,在您的技能根目录中有该文件:
.ask/config它应该看起来像这样:
{
"deploy_settings": {
"default": {
"skill_id": "put here your skill id or leave it blank",
"was_cloned": false,
"merge": {
"manifest": {
"apis": {
"custom": {
"endpoint": {
"uri": "https://yourhttps.de",
"sslCertificateType": "Wildcard"
}
}
}
}
}
}
}
}之后,您可以使用ask-cli并将https服务器作为端点:)
发布于 2018-04-26 18:36:04
试试这个:
"apis": {
"custom": {
"endpoint": {
"uri": "https://customapi.sampleskill.com",
"sslCertificateType": "Wildcard"
},
"regions": {
"EU": {
"endpoint": {
"uri": "https://customapi.sampleskill.com",
"sslCertificateType": "Trusted"
}
}
}
}
}在默认配置中,您设置了sourceDir,这对于AWS Lambda之外的端点没有太大意义。其次,您的配置包含sslCertificateType周围的空格,这也可能导致问题。
https://stackoverflow.com/questions/50040138
复制相似问题