Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 1, 2025

Some languages add optional initialization parameters as properties to ClientOptions rather than constructor arguments. Added scenarios to test this behavior.

New Scenarios

  • OptionalParams (/optional-params) - All parameters optional

    • name?: string (header)
    • region?: string (query)
  • OptionalAndRequiredParams (/optional-and-required-params) - Mixed optionality

    • name: string (required header)
    • region?: string (optional query)

Example Usage

// All optional - can omit entirely
const client = new OptionalParamsClient();

// Mixed - required must be provided, optional can be omitted
const client = new OptionalAndRequiredParamsClient({
  name: "test-name-value"  // required
  // region is optional
});

Files Changed

Original prompt

This section details on the original issue you should resolve

<issue_title>ClientInitialization scenarios should include a scenario with optional parameters</issue_title>
<issue_description>Some languages have different behavior for optional initialization parameters as they would be added as properties to the ClientOptions. We should have a new scenario that contains optional parameters as well as a scenario that has both optional and required.</issue_description>

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


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Add client initialization scenario for optional parameters Add ClientInitialization scenarios with optional parameters Dec 1, 2025
Copilot AI requested a review from JoshLove-msft December 1, 2025 19:57
@JoshLove-msft JoshLove-msft marked this pull request as ready for review December 1, 2025 20:09
Copy link
Contributor Author

Copilot AI commented Dec 2, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • telemetry.astro.build
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/typespec-azure/typespec-azure/website/node_modules/.bin/../astro/astro.js build (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI requested a review from tadelesh December 2, 2025 06:41
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.

ClientInitialization scenarios should include a scenario with optional parameters

3 participants