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

Updating OAuthClient API based on latest service swagger #1282

Merged
merged 5 commits into from
Feb 4, 2019

Conversation

Jeffders
Copy link
Member

Updated the TokenAPI.json swagger file, and generated (for the first time), the autorest clients and supporting classes for this swagger. Then I updated the tests and BotFrameworkAdapter to use these methods.

I ran the unit tests and also did manual testing against production DirectLine:
-GetToken
-SignIn flow (with and without the magic code)
-SignOut
-GetAadTokens

@coveralls
Copy link
Collaborator

coveralls commented Jan 11, 2019

Pull Request Test Coverage Report for Build 48449

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 46 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.01%) to 69.47%

Files with Coverage Reduction New Missed Lines %
/libraries/Microsoft.Bot.Builder/BotFrameworkAdapter.cs 46 15.55%
Totals Coverage Status
Change from base Build 48226: -0.01%
Covered Lines: 3527
Relevant Lines: 5077

💛 - Coveralls

using System.Net;
using System.Net.Http;

public partial class OAuthClient : ServiceClient<OAuthClient>, IOAuthClient
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand the relationship between this class, the "Old" version of this class, and the Interface.

My understanding is that this is a Breaking Change, which we can't do. I believe this needs to be OAuthClient2, and the old one can have a "[Obsolete / Depricated] attribute added to it.

libraries/Microsoft.Bot.Connector/OAuthClientConfig.cs Outdated Show resolved Hide resolved
libraries/Microsoft.Bot.Schema/TokenStatus.cs Show resolved Hide resolved
@cleemullins
Copy link
Contributor

@Jeffders Hey Jeff, this looks like a great improvement. There are a few breaking changes I saw in there that I don't think we'll be able to take - I called out the ones I saw, but you'll have to go through with a very careful eye.

Also - do we need to port this back to SDK3? I think we only need it in V4, but as it's protocol changes I'm not clear.

@cleemullins
Copy link
Contributor

I've followed up with @Jeffders to figure out what to do with this PR.

@cleemullins cleemullins merged commit 8ec0da2 into master Feb 4, 2019
@cleemullins cleemullins deleted the jeffders/swaggerTokenAPI branch February 4, 2019 20:55
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.

None yet

4 participants