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]: Unable to override HTTP method from operation template #3636

Open
4 tasks done
johanste opened this issue Jun 20, 2024 · 1 comment · May be fixed by #3637
Open
4 tasks done

[Bug]: Unable to override HTTP method from operation template #3636

johanste opened this issue Jun 20, 2024 · 1 comment · May be fixed by #3637
Assignees
Labels
design:needed A design request has been raised that needs a proposal feature New feature or request lib:http triaged:core
Milestone

Comments

@johanste
Copy link
Contributor

Describe the bug

If I have an operation template that has a default http method (e.g. GET) but I want to override it in the actual instantiation, the typespec/http library will error. Since it is an error, I can't suppress it.

We should instead a) emit a warning and b) let the "outermost" application "win".

Reproduction

playground

Checklist

@johanste johanste added the bug Something isn't working label Jun 20, 2024
@markcowl markcowl added feature New feature or request design:needed A design request has been raised that needs a proposal and removed bug Something isn't working labels Jun 24, 2024
@markcowl markcowl added this to the [2024] August milestone Jun 24, 2024
@markcowl markcowl self-assigned this Jun 25, 2024
@markcowl
Copy link
Contributor

  • continue an error diagnostic for two different http verb decorators on the same node
  • otherwise, allow the outermost decorator to override

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design:needed A design request has been raised that needs a proposal feature New feature or request lib:http triaged:core
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants