-
Notifications
You must be signed in to change notification settings - Fork 5.6k
BotService: Support for channel management in bots #2793
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
Conversation
Automation for azure-sdk-for-goA PR has been created for you: |
Automation for azure-sdk-for-pythonA PR has been created for you based on this PR content. Once this PR will be merged, content will be added to your service PR: |
Automation for azure-libraries-for-javaNothing to generate for azure-libraries-for-java |
Automation for azure-sdk-for-nodeNothing to generate for azure-sdk-for-node |
|
The goal of this pull request is mainly to introduce Channels, which are different means to expose a bot. Given that a bot resource has multiple channels, we have modeled the channels as a nested (and proxy only) resource of the bot. We have multiple channels where bots can be exposed, and each has a different payload, but there is common information and machinery across channels as well. This is why we modeled channels the following way /botservice/{botid}/channel/{channelid} Where channel id specifies the type of the channel, such as Facebook, Email or Skype. In the swagger , given that each channel has a specific payload, we create a base class channel and then inherited classes, making use of the "discriminator" feature of swagger. |
|
@marstr Stole this from you since I got assigned to the original PR in private, just moved this over to public 🙂 |
|
@carlosscastro Awesome, thanks for moving this over! 🙂 |
|
@ravbhatnagar New operations (anything starting with Note that the diff formally indicates breaking changes (e.g. changed path of "check name availability" operation), but there are none: The RP went public as represented by the Swagger after this PR and no SDKs have been released based on the "old" Swagger. I've only migrated the old Swagger from private to public in order to accept this PR against public. |
| "type": "string", | ||
| "description": "Facebook application secret" | ||
| }, | ||
| "accessToken": { |
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.
Is this a secret? If yes, it should not be returned via a GET
| "type": "string", | ||
| "description": "Facebook application id" | ||
| }, | ||
| "appSecret": { |
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.
Is this a secret? If yes, it should not be returned via a GET
| "readOnly": true, | ||
| "description": "Callback Url" | ||
| }, | ||
| "isEnabled": { |
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.
bools are typically not recommended. Not self descriptive and dont allow for future expansion of values that can be supported. Consider - channelState or channelStatus - Enabled|Disabled and in future it can potentially support more values.
| "type": "string", | ||
| "description": "The email address" | ||
| }, | ||
| "password": { |
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.
Should not be returned via a GET/PUT. It should be exposed via POST if needed.
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.
same feedback for all other such properties in different models.
|
@carlosscastro please address the feedback, otherwise this PR will be closed due to inactivity (but can of course be reopened at a later point in time). |
|
@salameer @carlosscastro Closing due to inactivity. Feel free to reopen once you are ready to address the feedback. |
|
Thanks! I was waiting for a response from Gaurav regarding the right soluiton to his comments. |
This checklist is used to make sure that common issues in a pull request are addressed. This will expedite the process of getting your pull request merged and avoid extra work on your part to fix issues discovered during the review process.
PR information
api-versionin the path should match theapi-versionin the spec).Quality of Swagger