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

Add support for custom slot types #275

Merged
merged 5 commits into from
Aug 19, 2017
Merged

Conversation

lazerwalker
Copy link
Collaborator

@lazerwalker lazerwalker commented Aug 18, 2017

This adds in support for defining your own custom slot types.

The use case for this: I have a script that automatically takes my generated Skill Builder schema, navigates to the Amazon dev portal, and uploads the new schema file + rebuilds the interaction model. For my skills that have custom slot types, this means uploading a new schema file overwrites my existing custom slot types, which renders that workflow useless. Adding first-class support for custom slot types within the library itself means that the Skill Builder schema file it generates can now contain 100% of your interaction model for skills with custom slot types.

In its simplest form, you can add a custom slot type via app.customSlot("SlotName", ["value1", "value2", "value3"]). There's a slightly more verbose syntax if you want to take advantage of the new Skill Builder features, like synonyms.

If you do that, and then call app.schemas.skillBuilder(), the resulting schema object contains your custom slots, ready to paste into the Skill Builder UI.

This doesn't affect intents or actually handling requests (nor should there really be any reason to). It exists purely to thread the data through to the schema JSON.

This would resolve #114 and #222.

@dblock
Copy link
Collaborator

dblock commented Aug 19, 2017

This is perfect, merging!

@jradwan
Copy link

jradwan commented Aug 20, 2017

Nice! So this will be part of the next 4.1.1 release?

@lazerwalker
Copy link
Collaborator Author

Yep, it'll be part of the next release (which I suspect should actually be called 4.2.0.

Unless anyone else feels differently, my plan was to wait until a few other pending threads were closed before cutting a new release. Tracking here: #277

@lazerwalker lazerwalker deleted the slot-types branch August 20, 2017 17:08
@lazerwalker
Copy link
Collaborator Author

@jradwan I just pushed a new version 4.2.0 that has these changes, if that's of use to you. 🎉

@jradwan
Copy link

jradwan commented Sep 14, 2017

Great, thanks @lazerwalker! I have no internet at home (after Hurricane Irma - power, but no TV/internet/phone) but once I do I'm looking forward to testing this out. 😄

@lazerwalker
Copy link
Collaborator Author

Oh no! Hope things aren’t too bad :(

@jradwan
Copy link

jradwan commented Sep 18, 2017

We were lucky ... no major damage (lost a fence, lots of tree debris), got power back after 21 hours and internet after 5 days. Thanks for asking!

@jradwan
Copy link

jradwan commented Sep 23, 2017

Gave this a shot and see how the app.schema.skillBuilder call works, nice. Now if I could just get the results into the Alexa Tester UI for the alexa-app-server.

Thanks again!

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

Successfully merging this pull request may close these issues.

Custom Slot Types don't appear in Alexa Tester
3 participants