Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 25, 2026

The playground sample was using endpoint: string instead of endpoint: url in the @server decorator, inconsistent with best practices and other samples throughout the codebase.

Changes

  • Updated packages/typespec-azure-playground-website/samples/azure-core.tsp to use endpoint: url
 @server(
   "{endpoint}/widget",
   "Contoso Widget APIs",
   {
-    endpoint: string,
+    endpoint: url,
   }
 )

This aligns with the pattern used in documentation and test files across the repository.

Original prompt

This section details on the original issue you should resolve

<issue_title>Default data plane service in playground should use a url endpoint</issue_title>
<issue_description>```@server(
"{endpoint}/widget",
"Contoso Widget APIs",
{
/**
Supported Widget Services endpoints (protocol and hostname, for example:
https://westus.api.widget.contoso.com).
*/
endpoint: string,
}
)

Is there any reason to define this as a string? I believe the best practice is to use `url`.

[Playground Link](https://azure.github.io/typespec-azure/playground/?sample=Azure+Core+Data+Plane+Service&options=%7B%22linterRuleSet%22%3A%7B%22extends%22%3A%5B%22%40azure-tools%2Ftypespec-azure-rulesets%2Fdata-plane%22%5D%7D%7D&vs=%7B%7D)</issue_description>

## Comments on the Issue (you are @copilot in this section)

<comments>
</comments>


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…Plane Service playground sample

Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
Copilot AI changed the title [WIP] Update default data plane service to use URL endpoint Use url type for endpoint parameter in Azure Core Data Plane Service playground sample Jan 25, 2026
Copilot AI requested a review from JoshLove-msft January 25, 2026 23:16
@JoshLove-msft JoshLove-msft marked this pull request as ready for review January 26, 2026 00:00
@azure-sdk
Copy link
Collaborator

No changes needing a change description found.

@azure-sdk
Copy link
Collaborator

You can try these changes here

🛝 Playground 🌐 Website

Copy link
Member

@lmazuel lmazuel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me

@JoshLove-msft JoshLove-msft added this pull request to the merge queue Jan 26, 2026
Merged via the queue into main with commit e80f705 Jan 26, 2026
25 checks passed
@JoshLove-msft JoshLove-msft deleted the copilot/update-data-plane-url-endpoint branch January 26, 2026 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default data plane service in playground should use a url endpoint

5 participants