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

alexa smart home event schema #8255

Merged

Conversation

thewizarodofoz
Copy link
Contributor

Closes: #8024

@codecov-commenter
Copy link

codecov-commenter commented Sep 16, 2020

Codecov Report

Merging #8255 into master will increase coverage by 0.08%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8255      +/-   ##
==========================================
+ Coverage   88.09%   88.18%   +0.08%     
==========================================
  Files         248      250       +2     
  Lines        9376     9395      +19     
==========================================
+ Hits         8260     8285      +25     
+ Misses       1116     1110       -6     
Impacted Files Coverage Δ
...aws/package/compile/events/alexaSmartHome/index.js 100.00% <ø> (ø)
lib/plugins/aws/provider/awsProvider.js 93.18% <ø> (+0.07%) ⬆️
lib/plugins/aws/package/compile/functions/index.js 96.64% <0.00%> (-0.61%) ⬇️
.../package/compile/events/websockets/lib/validate.js 97.22% <0.00%> (-0.51%) ⬇️
lib/plugins/aws/info/display.js 81.92% <0.00%> (-0.22%) ⬇️
lib/utils/analytics/generatePayload.js 96.00% <0.00%> (-0.16%) ⬇️
lib/configSchema.js 100.00% <0.00%> (ø)
lib/plugins/print/print.js 100.00% <0.00%> (ø)
lib/plugins/aws/invokeLocal/index.js 69.66% <0.00%> (ø)
lib/plugins/aws/package/compile/layers/index.js 95.60% <0.00%> (ø)
... and 21 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ce51c8f...9ccb0af. Read the comment docs.

Copy link
Contributor

@medikoo medikoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @thewizarodofoz it looks great. I have just one proposal, so we can reuse token format in other event definition

@@ -11,9 +11,25 @@ class AwsCompileAlexaSmartHomeEvents {
'package:compileEvents': this.compileAlexaSmartHomeEvents.bind(this),
};

// TODO: Complete schema, see https://github.com/serverless/serverless/issues/8024
const appIdSchema = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it'll be good to define awsAlexaEventToken at

and rely on that ?

Especially that it looks we will need same reference in alexaSkill event

@thewizarodofoz thewizarodofoz changed the title alex smart home event schema alexa smart home event schema Sep 16, 2020
make it reusable for alexaSkill
Copy link
Contributor

@medikoo medikoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks you @thewizarodofoz ! That looks very good, I've spotted just one missing

appId: { $ref: '#/definitions/awsAlexaEventToken' },
enabled: { type: 'boolean' },
},
required: ['appId'],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We miss additionalProperties: false

Copy link
Contributor

@medikoo medikoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @thewizarodofoz it looks great. I've commented on just one minor convention thing

@@ -234,6 +234,12 @@ class AwsProvider {
UpdateReplacePolicy: { type: 'string' },
Condition: { type: 'string' },
},
awsAlexaEventToken: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's maintain alphabetical order

Copy link
Contributor

@medikoo medikoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @thewizarodofoz !

@medikoo medikoo merged commit bd5099e into serverless:master Sep 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Config schema: Define AWS "alexaSmartHome" function event properties
3 participants