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
feat(aws): add schema for alexaSkill
#8290
feat(aws): add schema for alexaSkill
#8290
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8290 +/- ##
==========================================
- Coverage 88.18% 88.16% -0.02%
==========================================
Files 250 250
Lines 9398 9391 -7
==========================================
- Hits 8288 8280 -8
- Misses 1110 1111 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @pgrzesik looks very good! I've proposed just one minor style improvement
].join(''); | ||
throw new this.serverless.classes.Error(errorMessage); | ||
} | ||
} else if (typeof event.alexaSkill === 'object') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As it's a last acceptable form, we may simplify this to } else {
(it'll be nice also because typeof x === 'object'
feels quirky (e.g. null
passes such condition))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good call, changed 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @pgrzesik !
Adds schema definition for
alexaSkill
event.In addition, it also adds deprecation for defining
alexaSkill
with just analexaSkill
string. That configuration is not covered by schema as it would require a rewrite of current utility for defining event schemas. Related discussion in corresponding issue.Closes: #8023