0

I've created an Alexa skill based on the Hello World template using the ASK CLI. The skill is called demo-skill. I want to use the ask api update-skill command to update the skill to reflect local changes that I've made to the en-US.json file in the demo-skill project structure. This is the command I'm using:

ask api update-skill --skill-id <my skill id> --file <my working directory>/demo-skill/models/en-US.json

This is the error I'm receiving:

Call update-skill error.
    Error code: 400
    {
      "message": "Skill manifest is not valid.",
      "violations": [
        {
          "code": "INVALID_REQUEST_PARAMETER",
          "message": "Instance at property path \"$\" has an invalid number of properties. Actual properties: 0, Minimum properties: 1",
          "validationDetails": {
            "originalInstance": {
              "propertyPath": "$",
              "type": "BODY"
            },
            "reason": {
              "actualProperties": 0,
              "minimumProperties": 1,
              "type": "INVALID_NUMBER_OF_PROPERTIES"
            }
          }
        }
      ]
    }

Can someone please explain what parameter is missing here and how can I update a skill using the CLI if what I'm doing is wrong?

Space Cadet
  • 385
  • 6
  • 23

1 Answers1

0

The command you are using is to update the schema of the skill, vs the interaction model.

The corollary to 'get' the schema is:

ask api get-skill -s {skill_id} --stage development > skill.json

If you turn around and put the output of that command into your command:

ask api update-skill --skill-id <my skill id> --file skill.json

you should find that the command executes successfully.

You may be looking for:

ask api update-model <-s|--skill-id <skillId>> <-f|--file <fileName>> <-l|--locale <locale>> [-g|--stage <stage>] [-d|--description <description>] [-p|--profile <profile>] [--debug] 

Here are the docs for that:

ASK CLI command reference

Dana
  • 683
  • 1
  • 6
  • 21