Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Equivalent of ask add isp in ASK CLI v2.x #141

Open
habuma opened this issue Apr 22, 2020 · 8 comments
Open

Equivalent of ask add isp in ASK CLI v2.x #141

habuma opened this issue Apr 22, 2020 · 8 comments

Comments

@habuma
Copy link

habuma commented Apr 22, 2020

I'm submitting a...


[X] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[X] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

Expected Behavior

With ASK CLI v1.x, I could create a new ISP JSON file by following the wizard that begins with ask add isp. Although it's name may have been debatably confusing (it doesn't actually add a product), it was a very useful command, helping to create a new ISP JSON file by answering a few questions. I'd expect that this facility still be available in ASK CLI v2.x.

Current Behavior

Simply put, there is no equivalent to ask add isp in ASK CLI v2.x. Instead, if I want to create a new product, I have to create the JSON file (over 50 lines) by hand or copy/paste/edit from a previously created JSON file. In this way, ASK CLI v2.x has become less useful than its predecessor.

Steps to Reproduce (for bugs)

It's hard to reproduce what can't be done anymore.

Possible Solution

I'd like to see an equivalent to the ask add isp command be reinstated in ASK CLI v2.x. It doesn't have to be the same command name, but equivalent would be useful.

Your Environment and Context

  • ask-cli version: 2.1.0
  • Operating System and version: MacOS 10.15.2
  • Node.js version used for development: 12.16.2
  • NPM version used for development: 6.14.4
@Chih-Ying
Copy link
Contributor

Hi @habuma
Thanks for the question!
In CLI v2, we consider all skill-package resources (including ISP, interationModels, skill.json etc) as a whole. So, we do not have high-level commands for specific skill resources.
However, you can add and remove ISP JSON files directly from the skill-package/isps directory of your skill project as needed.

Please refer to the document: https://developer.amazon.com/en-US/docs/alexa/smapi/ask-cli-v1-to-v2-migration-guide.html#remove-high-level-isp-commands-add-remove-and-status

@habuma
Copy link
Author

habuma commented Apr 25, 2020

I understand, but as a reminder, ask add isp doesn't actually add an in-skill product...it acts as a wizard for creating a JSON file. And ASK CLI v2 does provide a wizards that produces skill artifacts such as skill.json and en-US.json (e.g., ask new).

I understand the philosophy you've embraced in this new version of the CLI, but given that it removes a very very very useful feature that was available in the previous version, I find that this philosophy has resulted in a tool that is less capable than its predecessor and now requires that developers either create the ISP JSON files by hand, copy-n-paste them, or use the forms in the developer console (in which case, why not just give up on the CLI altogether and do everything from the developer console?).

If there's no chance that you'll reinstate something equivalent for creating the ISP JSON files, then close this issue. But I ask that you consider how this decision reduces the usefulness of the ASK CLI as compared to v1.x. (To be clear, the ASK CLI is still useful...just a little less so.)

@volkanpaksoy
Copy link

If we create an ISP using Alexa Developer Console, can we export it to JSON?

If not, what is the best source to find a template for ISP?

@kakhaUrigashvili
Copy link
Contributor

@volkanpaksoy you can possibly use 'ask smapi get-isp-definition' command to do this. There are many more smapi commands for isp that can help automate isp tasks.

@volkanpaksoy
Copy link

@kakhaUrigashvili Thanks for your response. I think the closest SMAPI command is create-isp-for-vendor:

https://developer.amazon.com/en-US/docs/alexa/smapi/ask-cli-command-reference.html#create-isp-for-vendor-subcommand

which expects this parameter:

--create-in-skill-product-request
Required. defines the request body for createInSkillProduct API. [JSON].

I think the JSON it expects is the one I was asking about.

It would be nice to have a subcommand like generate-in-skill-product-template or something like that that would generate a JSON template.

@kakhaUrigashvili
Copy link
Contributor

@volkanpaksoy you can find templates here
https://developer.amazon.com/en-US/docs/alexa/smapi/isp-schemas.html
https://s3.amazonaws.com/ask-cli/isp/isp_template_index.json

@volkanpaksoy
Copy link

@kakhaUrigashvili That's great. Thank you.

@uemuram
Copy link

uemuram commented Jan 9, 2021

After putting the json file obtained from the above URL under skill-package/isps/entitlement,
I ran ask deploy, but the product was not registered.
https://s3.amazonaws.com/ask-cli/isp/entitlement_template_v1.json

Is there anything I need to do other than run ask deploy?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

7 participants