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

[Bug]: Wrong property and generation on Oauth2Flow PasswordFlow #3137

Closed
codler opened this issue Apr 9, 2024 · 0 comments · Fixed by #3196
Closed

[Bug]: Wrong property and generation on Oauth2Flow PasswordFlow #3137

codler opened this issue Apr 9, 2024 · 0 comments · Fixed by #3196
Assignees
Labels
bug Something isn't working triaged:core
Milestone

Comments

@codler
Copy link

codler commented Apr 9, 2024

Describe the bug

This Passwordflow https://typespec.io/docs/libraries/http/reference/js-api/interfaces/PasswordFlow currently have the property authorizationUrl, it should be tokenUrl instead. See https://swagger.io/docs/specification/authentication/oauth2/

Reproduction

https://typespec.io/playground?c=aW1wb3J0ICJAdHlwZXNwZWMvaHR0cCI7Cgp1c2luZyBUeXBlU3BlYy5IdHRwOwpAc2VydmljZSh7CiAgdGl0bGU6ICJXaWRnZXQgU8YbIiwKfSkKQHVzZUF1dGgoCiAgT8QJMsQFPFsKICAgIMQ9xAHEdDrHH0Zsb3fEbS5wYXNzd29yZCzHJWF1dGhvcml6YXRpb25Vcmw6ICJ4IsYdfQogIF0%2BCikKbmFtZXNwYWNlIERlbW%2FnAIk7Cg%3D%3D&e=%40typespec%2Fopenapi3&options=%7B%22linterRuleSet%22%3A%7B%22extends%22%3A%5B%22%40typespec%2Fhttp%2Fall%22%5D%7D%7D

import "@typespec/http";

using TypeSpec.Http;
@service({
  title: "Widget Service",
})
@useAuth(
  OAuth2Auth<[
    {
      type: OAuth2FlowType.password,
      authorizationUrl: "x",
    }
  ]>
)
namespace DemoService;


### Checklist

- [X] Follow our [Code of Conduct](https://github.com/microsoft/typespec/blob/main/CODE_OF_CONDUCT.md)
- [X] Check that there isn't already an issue that request the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/Microsoft/typespec/discussions).
- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.
@codler codler added the bug Something isn't working label Apr 9, 2024
@codler codler changed the title [Bug]: Wrong property and generation on OauthFlow2 PasswordFlow [Bug]: Wrong property and generation on Oauth2Flow PasswordFlow Apr 9, 2024
@markcowl markcowl added this to the [2024] May milestone Apr 15, 2024
@timotheeguerin timotheeguerin self-assigned this Apr 19, 2024
github-merge-queue bot pushed a commit that referenced this issue Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triaged:core
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants