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

[tcgc] support value type for client default value #1631

Merged
merged 5 commits into from
Oct 8, 2024

Conversation

tadelesh
Copy link
Member

fix: #1598

@azure-sdk
Copy link
Collaborator

azure-sdk commented Sep 30, 2024

All changed packages have been documented.

  • @azure-tools/typespec-client-generator-core
Show changes

@azure-tools/typespec-client-generator-core - feature ✏️

support value type for client default value

@azure-sdk
Copy link
Collaborator

You can try these changes here

🛝 Playground 🌐 Website 📚 Next docs

Copy link
Contributor

@iscai-msft iscai-msft left a comment

Choose a reason for hiding this comment

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

the value in tsp purposefully is meant to describe service default values, not client default values, so we shouldn't be having this support. There are a lot of issues with roundtrippability with default values, so we should only have clientDefaultValue in the specific cases of endpoint values and client api versions. Where is the push for this support coming from?

@tadelesh
Copy link
Member Author

tadelesh commented Oct 8, 2024

the value in tsp purposefully is meant to describe service default values, not client default values, so we shouldn't be having this support. There are a lot of issues with roundtrippability with default values, so we should only have clientDefaultValue in the specific cases of endpoint values and client api versions. Where is the push for this support coming from?

see the issue linked in description. there are cases that endpoint default value use value types, the support is only for those cases.

@iscai-msft
Copy link
Contributor

ah ok, sorry for the confusion, let me remove the blocking pr

@iscai-msft iscai-msft added this pull request to the merge queue Oct 8, 2024
Merged via the queue into main with commit 29f7bdf Oct 8, 2024
22 checks passed
@iscai-msft iscai-msft deleted the fix_enum_default_value branch October 8, 2024 14:34
sarangan12 added a commit to sarangan12/typespec-azure that referenced this pull request Oct 10, 2024
Initial Commit

Bump core from `b2dc525` to `e80bdce` (Azure#1648)

Bumps [core](https://github.com/microsoft/typespec) from `b2dc525` to
`e80bdce`.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/microsoft/typespec/commit/e80bdce69982922b79cc59229432c769e93fe8c8"><code>e80bdce</code></a>
Fix: Passing <code>const</code> of model type to <code>@example</code>
(<a
href="https://redirect.github.com/microsoft/typespec/issues/4574">#4574</a>)</li>
<li><a
href="https://github.com/microsoft/typespec/commit/68c94a715bc84a2a0a782cbf42ced52a81224b4f"><code>68c94a7</code></a>
Add url property to diagnostic (<a
href="https://redirect.github.com/microsoft/typespec/issues/4442">#4442</a>)</li>
<li><a
href="https://github.com/microsoft/typespec/commit/7c425cdb08d1fadd00fda539966da5ce2b292e33"><code>7c425cd</code></a>
Fix enum in union example (<a
href="https://redirect.github.com/microsoft/typespec/issues/4462">#4462</a>)</li>
<li><a
href="https://github.com/microsoft/typespec/commit/0d1b320d70c8ec223d925a84f2d7389df8067630"><code>0d1b320</code></a>
<code>tsp compile --watch</code> watch config file (<a
href="https://redirect.github.com/microsoft/typespec/issues/4563">#4563</a>)</li>
<li><a
href="https://github.com/microsoft/typespec/commit/5145b902ff3fa691d741344ec6fab41cec18bc77"><code>5145b90</code></a>
Support customizing client accessibility (<a
href="https://redirect.github.com/microsoft/typespec/issues/4605">#4605</a>)</li>
<li><a
href="https://github.com/microsoft/typespec/commit/5e126782d508bbf48b7f1e286f06b8443aeaf232"><code>5e12678</code></a>
Add support for nested emitter options (<a
href="https://redirect.github.com/microsoft/typespec/issues/4539">#4539</a>)</li>
<li>See full diff in <a
href="https://github.com/microsoft/typespec/compare/b2dc52555f2b00250860821f37f1e5eafaa941bb...e80bdce69982922b79cc59229432c769e93fe8c8">compare
view</a></li>
</ul>
</details>
<br />

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)

</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Timothee Guerin <tiguerin@microsoft.com>

[tcgc] do not override client default value for api version param in non-versioning service (Azure#1630)

fix: Azure#1608

[tcgc] support value type for client default value (Azure#1631)

fix: Azure#1598

---------

Co-authored-by: iscai-msft <isabellavcai@gmail.com>

Adding ArmProviderAction template to ARM library (Azure#1639)

Issue: Azure#1614

---------

Co-authored-by: Mark Cowlishaw <markcowl@microsoft.com>

Update core submodule to 854024a (Azure#1655)

Created this PR instead of using dependabot due to new packages in
`core` requiring the pnpm-lock file being updated.

Also updated TCGC to no longer grab projected source models since
microsoft/typespec#4445 updated core to project
the source models already.

---------

Co-authored-by: Christopher Radek <Christopher.Radek@microsoft.com>
Co-authored-by: Timothee Guerin <tiguerin@microsoft.com>

Add release notes for october release (Azure#1657)

Bump version for release 0.47.0 (core 0.61.0) (Azure#1658)

Backmerge/release/october 2024 2024 10 10 (Azure#1661)

Bump core from `29c0082` to `d4e4179` (Azure#1662)

Bumps [core](https://github.com/microsoft/typespec) from `29c0082` to
`d4e4179`.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/microsoft/typespec/commit/d4e4179349871a49baaabeb812ce7d071682e133"><code>d4e4179</code></a>
java generator, support non-string expandable enum for TypeSpec (<a
href="https://redirect.github.com/microsoft/typespec/issues/4492">#4492</a>)</li>
<li><a
href="https://github.com/microsoft/typespec/commit/bee3e4d221f45aecfe2843815e1b1c4d8a141e82"><code>bee3e4d</code></a>
http-client-java, eng, upgrade to typespec compiler 0.61 (<a
href="https://redirect.github.com/microsoft/typespec/issues/4671">#4671</a>)</li>
<li><a
href="https://github.com/microsoft/typespec/commit/ba1becbbfde4f819260a134fe67188ecd05163f7"><code>ba1becb</code></a>
[http-client-python] Fix ci to make sure generated SDK code pass lint
check (...</li>
<li><a
href="https://github.com/microsoft/typespec/commit/09317daa8ab39606c6efc76cf19d2fa4388d0357"><code>09317da</code></a>
http-client-java, new data boundary client to resources lib (<a
href="https://redirect.github.com/microsoft/typespec/issues/4572">#4572</a>)</li>
<li><a
href="https://github.com/microsoft/typespec/commit/dc5bf1235b99dcd43e7e4eb28b59d442228bfdcd"><code>dc5bf12</code></a>
pin ts-apigen version to 1.0.7 (<a
href="https://redirect.github.com/microsoft/typespec/issues/4652">#4652</a>)</li>
<li><a
href="https://github.com/microsoft/typespec/commit/bd952945c02cfd89059a86af19dabb2159ed5071"><code>bd95294</code></a>
implement apiversion parameter (<a
href="https://redirect.github.com/microsoft/typespec/issues/4527">#4527</a>)</li>
<li><a
href="https://github.com/microsoft/typespec/commit/9121ed41eb1ac7cc0d627b46a0e6aaf5958931de"><code>9121ed4</code></a>
[<code>@​typespec/spec</code>-*] Apply changes from CADL to Typespec
Repository (<a
href="https://redirect.github.com/microsoft/typespec/issues/4637">#4637</a>)</li>
<li>See full diff in <a
href="https://github.com/microsoft/typespec/compare/29c0082df30abf50262dc8bfd304622453973a12...d4e4179349871a49baaabeb812ce7d071682e133">compare
view</a></li>
</ul>
</details>
<br />

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Upgrade dependencies - October 2024 (Azure#1663)

Removed the assets

Added Chronus ChangeSet

Update Lock FIle

Response to PR Comments

Move the package to parent directory

nit
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.

[Bug]: EnumMember type as a clientDefaultValue?
4 participants