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

Can we just ignore the operation-level authentication information with useAuth? #2033

Open
MaryGao opened this issue Jan 3, 2025 · 0 comments
Labels
lib:tcgc Issues for @azure-tools/typespec-client-generator-core library

Comments

@MaryGao
Copy link
Member

MaryGao commented Jan 3, 2025

In TypeSpec/OpenAPI 3, we could define operation-level authentication by @useAuth/security section. But no matter TCGC or emitters didn't support this yet. Can we just ignore the operation-level authentication information with useAuth and report a warning in TCGC?

playground

@route("/widgets")
@tag("Widgets")
interface Widgets {
  @useAuth(NoAuth)
  @get list(): Widget[] | Error;

  @get read(@path id: string): Widget | Error;
}
@markcowl markcowl added the needs-info Mark an issue that needs reply from the author or it will be closed automatically label Jan 7, 2025
@markcowl markcowl removed the needs-info Mark an issue that needs reply from the author or it will be closed automatically label Jan 7, 2025
@markcowl markcowl added the lib:tcgc Issues for @azure-tools/typespec-client-generator-core library label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lib:tcgc Issues for @azure-tools/typespec-client-generator-core library
Projects
None yet
Development

No branches or pull requests

2 participants