[英]Alexa ask-cli how to add a custom https server
I'm not able deploy alexa skill using alexa-cli tool ( https://www.npmjs.com/package/ask-cli ) when I try to deploy my skill with a https server 当我尝试通过https服务器部署我的技能时,我无法使用Alexa-cli工具( https://www.npmjs.com/package/ask-cli )部署Alexa技能
As an error I get: 作为错误,我得到:
◞ Creating new skill...Call create-skill error.
Error code: 400
{
"message": "Skill manifest is not valid.",
"violations": [
{
"message": "No default regionalized endpoint is defined."
}
]
}
Im using an example skill.json from: https://github.com/alexa/skill-sample-nodejs-hello-world/blob/master/skill.json 我正在使用示例技能: https : //github.com/alexa/skill-sample-nodejs-hello-world/blob/master/skill.json
A problem is how to add custom uri endpoint. 问题是如何添加自定义uri端点。 I dont want to host my skill in AWS lambda function.
我不想在AWS lambda函数中发挥我的技能。
I tried to follow documentation: https://developer.amazon.com/de/docs/smapi/ask-cli-command-reference.html but I dont know what Im doing wrong... 我试图遵循文档: https : //developer.amazon.com/de/docs/smapi/ask-cli-command-reference.html但我不知道我在做什么错...
Could sombody please take a look at my json and alexa-cli documentation? 可以请大家看看我的json和alexa-cli文档吗? Why Im getting a such weird message?
为什么我收到这样奇怪的消息?
"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"
}
}
Ok for those who faced that problem in the future ;) Important is that in your skill root directory you have that file: 好的,对于那些将来遇到这个问题的人来说很重要;)重要的是,在您的技能根目录中,您拥有该文件:
.ask/config
It should look like: 它应该看起来像:
{
"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"
}
}
}
}
}
}
}
}
after that you can use ask-cli with the https server as an endpoint :) 之后,您可以将Ask-cli与https服务器一起用作终结点:)
Try this: 尝试这个:
"apis": {
"custom": {
"endpoint": {
"uri": "https://customapi.sampleskill.com",
"sslCertificateType": "Wildcard"
},
"regions": {
"EU": {
"endpoint": {
"uri": "https://customapi.sampleskill.com",
"sslCertificateType": "Trusted"
}
}
}
}
}
In the default config you had set sourceDir
which doesn't make much sense for endpoints outside AWS Lambda. 在默认配置中,您设置了
sourceDir
,对于AWS Lambda之外的终端节点没有多大意义。 Second your config contained whitespace around sslCertificateType
, which also might cause the problem. 其次,您的配置在
sslCertificateType
周围包含空格,这也可能导致问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.