-
Notifications
You must be signed in to change notification settings - Fork 30
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
fix(decorator): replace hard code url with {endpoint}
in @scenarioService
#598
fix(decorator): replace hard code url with {endpoint}
in @scenarioService
#598
Conversation
🦋 Changeset detectedLatest commit: 8e9ca17 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Any other language need this? For Java, this change means we need to update all the client in test (probably on the hundreds) to set endpoint=localhost:3000 |
I believe dotnet is not using But dotnet allows users to override the host, even if it's explicitly specified in spec. Things could be different in other languages. We can hold this PR for further discussion. |
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.
LGTM, can we make its default value as "http://localhost:3000" so that it won't break others.
I don't think we can, because currently there's no way to set client side default value in typespec. |
for endpoint, tcgc will treat service default as client default. this is the only exception. mpg template also has such pattern. @archerzz could you help to refine it? |
I see :-) Yeah, if we all take the service default of "host" as client default, I am good with this PR, as long as it have localhost as default of the endpoint. |
Please hold this PR. After discussion, we decided to inject the following: @server(
"{endpoint}",
"Test server endpoint",
{
endpoint: string = "http://localhost:3000",
}
) blocked by Azure/typespec-azure#1030 |
04f02e5
to
3142134
Compare
3142134
to
7e6bff4
Compare
Note, this is blocked by Azure/typespec-azure#1030 |
@archerzz i believe you could merge this pr. current tcgc will do the same thing. |
…scenarioService` (#598)" (#719) * Revert "fix(decorator): replace hard code url with `{endpoint}` in `@scenarioService` (#598)" This reverts commit 039ab07. * add changeset --------- Co-authored-by: Mingzhe Huang (from Dev Box) <[email protected]>
Hard coded value should be replaced by a parameter, like #425
fix #597
Cadl Ranch Contribution Checklist:
@scenario
names. Someone can look at the list of scenarios and understand what I'm covering.@scenarioDoc
s for extra scenario description and to tell people how to pass my mock api check.