当我尝试使用 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."
}
]
}
我使用的示例 skill.json 来自: https://github.com/alexa/skill-sample-nodejs-hello-world/blob/master/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"
}
}
最佳答案
对于那些将来遇到该问题的人来说是好的 ;) 重要的是在你的技能根目录中你有那个文件:
.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 服务器作为端点:)
关于javascript - Alexa ask-cli 如何添加自定义 https 服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50040138/