diff --git a/.changeset/proud-garlics-shake.md b/.changeset/proud-garlics-shake.md new file mode 100644 index 000000000..b73f122db --- /dev/null +++ b/.changeset/proud-garlics-shake.md @@ -0,0 +1,6 @@ +--- +"@azure-tools/cadl-ranch-specs": patch +"@azure-tools/cadl-ranch": patch +--- + +use-endpoint-instead-of-localhost diff --git a/packages/cadl-ranch-specs/http/client/structure/common/service.tsp b/packages/cadl-ranch-specs/http/client/structure/common/service.tsp index 7feb46c60..ad0c0d9f9 100644 --- a/packages/cadl-ranch-specs/http/client/structure/common/service.tsp +++ b/packages/cadl-ranch-specs/http/client/structure/common/service.tsp @@ -17,9 +17,13 @@ using Azure.ClientGenerator.Core; 6. have two clients with a hierarchy relation. """) @server( - "http://localhost:3000/client/structure/{client}", + "{endpoint}/client/structure/{client}", "", { + @doc("Need to be set as 'http://localhost:3000' in client.") + endpoint: url, + + @doc("Need to be set as 'default', 'multi-client', 'renamed-operation', 'two-operation-group' in client.") client: ClientType, } ) diff --git a/packages/cadl-ranch-specs/http/resiliency/srv-driven/main.tsp b/packages/cadl-ranch-specs/http/resiliency/srv-driven/main.tsp index c6707f7ce..910b3924d 100644 --- a/packages/cadl-ranch-specs/http/resiliency/srv-driven/main.tsp +++ b/packages/cadl-ranch-specs/http/resiliency/srv-driven/main.tsp @@ -25,9 +25,12 @@ using TypeSpec.Http; }) @service @server( - "http://localhost:3000/resiliency/service-driven/client:v2/service:{serviceDeploymentVersion}/api-version:{apiVersion}", + "{endpoint}/resiliency/service-driven/client:v2/service:{serviceDeploymentVersion}/api-version:{apiVersion}", "Testserver endpoint", { + @doc("Need to be set as 'http://localhost:3000' in client.") + endpoint: url, + @doc("Pass in either 'v1' or 'v2'. This represents a version of the service deployment in history. 'v1' is for the deployment when the service had only one api version. 'v2' is for the deployment when the service had api-versions 'v1' and 'v2'.") serviceDeploymentVersion: string, diff --git a/packages/cadl-ranch-specs/http/resiliency/srv-driven/old.tsp b/packages/cadl-ranch-specs/http/resiliency/srv-driven/old.tsp index 534cd89ef..f919edc6b 100644 --- a/packages/cadl-ranch-specs/http/resiliency/srv-driven/old.tsp +++ b/packages/cadl-ranch-specs/http/resiliency/srv-driven/old.tsp @@ -16,9 +16,12 @@ using TypeSpec.Versioning; }) @service @server( - "http://localhost:3000/resiliency/service-driven/client:v1/service:{serviceDeploymentVersion}/api-version:{apiVersion}", + "{endpoint}/resiliency/service-driven/client:v1/service:{serviceDeploymentVersion}/api-version:{apiVersion}", "Testserver endpoint", { + @doc("Need to be set as 'http://localhost:3000' in client.") + endpoint: url, + @doc("Pass in either 'v1' or 'v2'. This represents a version of the service deployment in history. 'v1' is for the deployment when the service had only one api version. 'v2' is for the deployment when the service had api-versions 'v1' and 'v2'.") serviceDeploymentVersion: string,