Граф коммитов

2818 Коммитов

Автор SHA1 Сообщение Дата
dependabot[bot] e31e08fd9f
Bump cookie and express in /packages/http-client-csharp
Bumps [cookie](https://github.com/jshttp/cookie) and [express](https://github.com/expressjs/express). These dependencies needed to be updated together.

Updates `cookie` from 0.6.0 to 0.7.1
- [Release notes](https://github.com/jshttp/cookie/releases)
- [Commits](https://github.com/jshttp/cookie/compare/v0.6.0...v0.7.1)

Updates `express` from 4.19.2 to 4.21.1
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.1/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.19.2...4.21.1)

---
updated-dependencies:
- dependency-name: cookie
  dependency-type: indirect
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-06 21:28:24 +00:00
dependabot[bot] 72e5c09a30
Bump happy-dom from 15.7.4 to 15.10.2 (#4992)
Bumps [happy-dom](https://github.com/capricorn86/happy-dom) from 15.7.4
to 15.10.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/capricorn86/happy-dom/releases">happy-dom's
releases</a>.</em></p>
<blockquote>
<h2>v15.10.2</h2>
<h3>👷‍♂️ Patch fixes</h3>
<ul>
<li>Fixes a security vulnerability that allowed for server side code to
be executed by a <code>&lt;script&gt;</code> tag - By <strong><a
href="https://github.com/capricorn86"><code>@​capricorn86</code></a></strong>
in task <a
href="https://redirect.github.com/capricorn86/happy-dom/issues/1585">#1585</a>
<ul>
<li>There was a case that was missed with the first patch</li>
</ul>
</li>
</ul>
<h2>v15.10.1</h2>
<h3>👷‍♂️ Patch fixes</h3>
<ul>
<li>Fixes a security vulnerability that allowed for server side code to
be executed by a <code>&lt;script&gt;</code> tag - By <strong><a
href="https://github.com/capricorn86"><code>@​capricorn86</code></a></strong>
in task <a
href="https://redirect.github.com/capricorn86/happy-dom/issues/1585">#1585</a></li>
</ul>
<h2>v15.10.0</h2>
<h3>🎨 Features</h3>
<ul>
<li>Adds a new setting called <code>disableSameOriginPolicy</code> that
makes it possible to bypass the same-origin policy in fetch requests -
By <strong><a
href="https://github.com/OlaviSau"><code>@​OlaviSau</code></a></strong>
in task <a
href="https://redirect.github.com/capricorn86/happy-dom/issues/1553">#1553</a></li>
</ul>
<h2>v15.9.0</h2>
<h3>🎨 Features</h3>
<ul>
<li>Adds support for &quot;aspect-ratio&quot; to
<code>CSSStyleDeclaration</code> - By <strong><a
href="https://github.com/yinm"><code>@​yinm</code></a></strong> in task
<a
href="https://redirect.github.com/capricorn86/happy-dom/issues/1147">#1147</a></li>
</ul>
<h2>v15.8.5</h2>
<h3>👷‍♂️ Patch fixes</h3>
<ul>
<li>Fixes bug where <code>Node.getRootNode()</code> returned null when
it was within a <code>ShadowRoot</code> that previously been
disconnected from the <code>Document</code> - By <strong><a
href="https://github.com/capricorn86"><code>@​capricorn86</code></a></strong>
in task <a
href="https://redirect.github.com/capricorn86/happy-dom/issues/1581">#1581</a></li>
</ul>
<h2>v15.8.4</h2>
<h3>👷‍♂️ Patch fixes</h3>
<ul>
<li>Fixes bug where child nodes of <code>HTMLSelectElement</code> and
<code>HTMLFormElement</code> had the wrong reference to the parent - By
<strong><a
href="https://github.com/capricorn86"><code>@​capricorn86</code></a></strong>
in task <a
href="https://redirect.github.com/capricorn86/happy-dom/issues/1578">#1578</a></li>
</ul>
<h2>v15.8.3</h2>
<h3>👷‍♂️ Patch fixes</h3>
<ul>
<li>Toggle &quot;open&quot; attribute on <code>HTMLDetailsElement</code>
when dispatching a click event on a summary element which is a child of
the details element - By <strong><a
href="https://github.com/mikedidomizio"><code>@​mikedidomizio</code></a></strong>
in task <a
href="https://redirect.github.com/capricorn86/happy-dom/issues/1534">#1534</a></li>
</ul>
<h2>v15.8.2</h2>
<h3>👷‍♂️ Patch fixes</h3>
<ul>
<li>Use <code>globalThis</code> instead of <code>global</code> to make
Happy DOM work in other runtimes such as Cloudflare workers - By
<strong><a
href="https://github.com/mattallty"><code>@​mattallty</code></a></strong>
in task <a
href="https://redirect.github.com/capricorn86/happy-dom/issues/1546">#1546</a></li>
</ul>
<h2>v15.8.1</h2>
<h3>👷‍♂️ Patch fixes</h3>
<ul>
<li>Always return <code>Promise&lt;Blob&gt;</code> from
<code>ClipboardItem.getType()</code> - By <strong><a
href="https://github.com/ezzatron"><code>@​ezzatron</code></a></strong>
in task <a
href="https://redirect.github.com/capricorn86/happy-dom/issues/1538">#1538</a></li>
</ul>
<h2>v15.8.0</h2>
<h3>👷‍♂️ Patch fixes</h3>
<ul>
<li>Adds support for using non-ASCII characters in custom elements when
parsing HTML - By <strong><a
href="https://github.com/capricorn86"><code>@​capricorn86</code></a></strong>
in task <a
href="https://redirect.github.com/capricorn86/happy-dom/issues/1079">#1079</a></li>
<li>Fixes an issue where <code>getHTML()</code> and
<code>getInnerHTML()</code> would return the slotted content of a shadow
root before the template, but the template should be the first child -
By <strong><a
href="https://github.com/capricorn86"><code>@​capricorn86</code></a></strong>
in task <a
href="https://redirect.github.com/capricorn86/happy-dom/issues/1079">#1079</a></li>
<li>Fixes a bug where SVG elements would not be found by
<code>getElementsByTagName()</code> - By <strong><a
href="https://github.com/capricorn86"><code>@​capricorn86</code></a></strong>
in task <a
href="https://redirect.github.com/capricorn86/happy-dom/issues/1079">#1079</a></li>
<li>Improves performance when creating elements (e.g. during parsing of
HTML) - By <strong><a
href="https://github.com/capricorn86"><code>@​capricorn86</code></a></strong>
in task <a
href="https://redirect.github.com/capricorn86/happy-dom/issues/1550">#1550</a>
<ul>
<li>Binding all methods to the target scope in Proxies caused a
performance hit, so this is now done when calling a method the first
time</li>
</ul>
</li>
</ul>
<h3>🎨 Features</h3>
<ul>
<li>Adds support for all remaining SVG elements:
<code>SVGAnimateElement</code>, <code>SVGAnimateMotionElement</code>,
<code>SVGAnimateTransformElement</code>, <code>SVGCircleElement</code>,
<code>SVGClipPathElement</code>, <code>SVGDefsElement</code>,
<code>SVGDescElement</code>, <code>SVGEllipseElement</code>,
<code>SVGFEBlendElement</code>, <code>SVGFEColorMatrixElement</code>,
<code>SVGFEComponentTransferElement</code>,
<code>SVGFECompositeElement</code>,
<code>SVGFEConvolveMatrixElement</code>,
<code>SVGFEDiffuseLightingElement</code>,
<code>SVGFEDisplacementMapElement</code>,
<code>SVGFEDistantLightElement</code>,
<code>SVGFEDropShadowElement</code>, <code>SVGFEFloodElement</code>,
<code>SVGFEFuncAElement</code>, <code>SVGFEFuncBElement</code>,
<code>SVGFEFuncGElement</code>, <code>SVGFEFuncRElement</code>,
<code>SVGFEGaussianBlurElement</code>, <code>SVGFEImageElement</code>,
<code>SVGFEMergeElement</code>, <code>SVGFEMergeNodeElement</code>,
<code>SVGFEMorphologyElement</code>, <code>SVGFEOffsetElement</code>,
<code>SVGFEPointLightElement</code>,
<code>SVGFESpecularLightingElement</code>,
<code>SVGFESpotLightElement</code>, <code>SVGFETileElement</code>,
<code>SVGFETurbulenceElement</code>, <code>SVGFilterElement</code>,
<code>SVGForeignObjectElement</code>, <code>SVGGElement</code>,
<code>SVGImageElement</code>, <code>SVGLineElement</code>,
<code>SVGLinearGradientElement</code>, <code>SVGMarkerElement</code>,
<code>SVGMaskElement</code>, <code>SVGMetadataElement</code>,
<code>SVGMPathElement</code>, <code>SVGPathElement</code>,
<code>SVGPatternElement</code>, <code>SVGPolygonElement</code>,
<code>SVGPolylineElement</code>, <code>SVGRadialGradientElement</code>,
<code>SVGRectElement</code>, <code>SVGScriptElement</code>,
<code>SVGSetElement</code>, <code>SVGStopElement</code>,
<code>SVGStyleElement</code>, <code>SVGSwitchElement</code>,
<code>SVGSymbolElement</code>, <code>SVGTextElement</code>,
<code>SVGTextPathElement</code>, <code>SVGTitleElement</code>,
<code>SVGTSpanElement</code>, <code>SVGUseElement</code> and
<code>SVGViewElement</code> - By <strong><a
href="https://github.com/capricorn86"><code>@​capricorn86</code></a></strong>
in task <a
href="https://redirect.github.com/capricorn86/happy-dom/issues/1079">#1079</a></li>
<li>Adds support for <code>DOMMatrix</code>,
<code>DOMMatrixReadOnly</code>, <code>DOMPoint</code> and
<code>DOMPointReadOnly</code> - By <strong><a
href="https://github.com/capricorn86"><code>@​capricorn86</code></a></strong>
in task <a
href="https://redirect.github.com/capricorn86/happy-dom/issues/1079">#1079</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="d23834c232"><code>d23834c</code></a>
fix: <a
href="https://redirect.github.com/capricorn86/happy-dom/issues/1585">#1585</a>
Fixes a security vulnerability that allowed for server side code...</li>
<li><a
href="5ee0b1676d"><code>5ee0b16</code></a>
fix: <a
href="https://redirect.github.com/capricorn86/happy-dom/issues/1585">#1585</a>
Fixes security vulnerability that allowed for server side code t...</li>
<li><a
href="a20dba9440"><code>a20dba9</code></a>
chore: <a
href="https://redirect.github.com/capricorn86/happy-dom/issues/1542">#1542</a>
Adds SECURITY.md file (<a
href="https://redirect.github.com/capricorn86/happy-dom/issues/1584">#1584</a>)</li>
<li><a
href="1625d40803"><code>1625d40</code></a>
feat: <a
href="https://redirect.github.com/capricorn86/happy-dom/issues/1553">#1553</a>
Adds setting disableSameOriginPolicy, to make it possible to by...</li>
<li><a
href="a78cd8f28d"><code>a78cd8f</code></a>
feat: <a
href="https://redirect.github.com/capricorn86/happy-dom/issues/1147">#1147</a>
Adds support for aspect-ratio to CSSStyleDeclaration (<a
href="https://redirect.github.com/capricorn86/happy-dom/issues/1537">#1537</a>)</li>
<li><a
href="e6f8b13b57"><code>e6f8b13</code></a>
fix: <a
href="https://redirect.github.com/capricorn86/happy-dom/issues/1581">#1581</a>
Fixes bug where Node.getRootNode() returned null when it was wi...</li>
<li><a
href="38ab960d0e"><code>38ab960</code></a>
fix: <a
href="https://redirect.github.com/capricorn86/happy-dom/issues/1578">#1578</a>
Fixes bug where child nodes of HTMLSelectElement and HTMLFormEle...</li>
<li><a
href="8f74989abe"><code>8f74989</code></a>
fix: <a
href="https://redirect.github.com/capricorn86/happy-dom/issues/1534">#1534</a>
Toggle open attribute on HTMLDetailsElement when dispatching a c...</li>
<li><a
href="7f57469f2e"><code>7f57469</code></a>
fix: <a
href="https://redirect.github.com/capricorn86/happy-dom/issues/1546">#1546</a>
Use <code>globalThis</code> instead of <code>global</code> to make Happy
DOM work in o...</li>
<li><a
href="759b4fb60e"><code>759b4fb</code></a>
fix: <a
href="https://redirect.github.com/capricorn86/happy-dom/issues/1538">#1538</a>
Always return Promise&lt;Blob&gt; from ClipboardItem.getType() (<a
href="https://redirect.github.com/capricorn86/happy-dom/issues/1539">#1539</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/capricorn86/happy-dom/compare/v15.7.4...v15.10.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=happy-dom&package-manager=npm_and_yarn&previous-version=15.7.4&new-version=15.10.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/microsoft/typespec/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-06 21:07:06 +00:00
keito 163912b68a
fix incorrect config schema in Docs (`TypeSpecProjectSchema.output-dir`) (#4965)
## description

The schema that was incorrectly referred to as `boolean` in the
documentation has been corrected to the correct one.

## referense

- relevant code

78140e410d/website/src/content/docs/docs/handbook/configuration/configuration.md?plain=1#L32

- schema source code

78140e410d/packages/compiler/src/config/config-schema.ts (L46-L49)
2024-11-06 19:12:12 +00:00
Timothee Guerin ad3a7a1359
New version banner that shows up for 7 days after the release (#4984)
<img width="714" alt="image"
src="https://github.com/user-attachments/assets/c59eedd6-b05c-40a3-a94f-b3c5672037cd">
2024-11-06 18:18:20 +00:00
Jorge Rangel aa531cfafc
[http-client-csharp] fix: generate deserialization switch for nested discriminators (#4982)
fixes: https://github.com/microsoft/typespec/issues/4979
2024-11-06 17:54:57 +00:00
Haoling Dong d1bcbf2240
http-client-java, upgrade to typespec compiler 0.62 (#4988) 2024-11-06 09:11:15 +00:00
Xiaofei Cao aca17034a5
[http-client-java] mgmt lite, use BearerTokenAuthenticationPolicy in azure-core (#4986)
- Replace `ArmChallengeAuthenticationPolicy` in azure-core-management
with `BearerTokenAuthenticationPolicy` in azure-core
- https://github.com/Azure/azure-sdk-for-java/issues/41984

Currently ARM has this feature disabled, so switching with no CAE
shouldn't affect anything.
CAE is implemented for `BearerTokenAuthenticationPolicy` in next
azure-core release, this feature will get automatically enabled when we
sync azure-core to 1.54.0
2024-11-06 07:13:39 +00:00
Yuchao Yan 69c3bc95f9
[python] Bump tsp 0.62.0 (#4985)
Bump tsp 0.62.0
2024-11-06 06:51:47 +00:00
Jose Manuel Heredia Hidalgo afd894565d
Propagate Namespace mutation to its types (#4937)
- Expose mutateSubgraphWithNamespace which allows Namespace mutations
- mutateSubgraph doesn't allow Namespace mutators. We want to keep
namespace mutator hidden as it is a more advanced use case.
2024-11-06 02:17:17 +00:00
Timothee Guerin 7aa6b682a6
Bump version for 0.62.0 release (#4980) 2024-11-05 21:33:01 +00:00
Kyle Zhang ba9d7fe1d4
Add documentation on 'security' field in the Operation object (#4966)
https://github.com/microsoft/typespec/issues/3926

---------

Co-authored-by: Kyle Zhang <v-zhanh@microsoft.com>
2024-11-05 20:19:00 +00:00
Timothee Guerin 63a0784d04
Add TypeSpec 0.62 release notes (#4977)
Co-authored-by: Christopher Radek <14189820+chrisradek@users.noreply.github.com>
2024-11-05 19:20:28 +00:00
Mario Guerra 5bf48870f0
remove redundant blog post titled (#4975) 2024-11-05 17:06:55 +00:00
Kyle Zhang 314b337154
Fix issue for xml-model (#4970)
missing items ` - {}` in Author

```
model Book {
  author: Author[];
}

model Author {
  @attribute id: string;
  book?: Book[];
}
```

```
Author:
      type: object
      required:
        - id
      properties:
        id:
          type: string
          xml:
            attribute: true
        book:
          type: array
          items:
            allOf:
              - {}
            xml:
              name: Book
          xml:
            wrapped: true
    Book:
      type: object
      required:
        - author
      properties:
        author:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Author'
            xml:
              name: Author
          xml:
            wrapped: true
```

---------

Co-authored-by: Kyle Zhang <v-zhanh@microsoft.com>
Co-authored-by: Timothee Guerin <timothee.guerin@outlook.com>
2024-11-05 17:06:15 +00:00
Chenjie Shi a2f38368d9
[http-client-python] upgrade to tcgc 0.47.4 (#4955)
there is no generated code diff:
https://github.com/Azure/autorest.python/pull/2900

---------

Co-authored-by: iscai-msft <43154838+iscai-msft@users.noreply.github.com>
2024-11-05 03:23:32 +00:00
Crystal YU 9c51f13aea
Don't propagate client parameters to operation (#4295)
Fix https://github.com/microsoft/typespec/issues/4161

We will not propagate client parameters to each operation of this
client.

- remove client parameters from Operation.Parameters
2024-11-05 02:22:08 +00:00
Timothee Guerin 78140e410d
Add paging support (#4470)
close https://github.com/microsoft/typespec/issues/705

---------

Co-authored-by: iscai-msft <43154838+iscai-msft@users.noreply.github.com>
Co-authored-by: Mark Cowlishaw <markcowl@microsoft.com>
2024-11-05 01:47:23 +00:00
Mario Guerra ae07f24855
lseg blog post (#4608) 2024-11-05 00:02:22 +00:00
Timothee Guerin b39abe5e63
Symbol refactor (#4849)
### Augment decorator issues
Fix https://github.com/microsoft/typespec/issues/4749 Augment/ref alias
properties
Fix https://github.com/microsoft/typespec/issues/2867 Augment/ref `model
is` properties
Fix https://github.com/microsoft/typespec/issues/4818 Augment/ref nested
model properties

### Circular reference issues
Fix https://github.com/microsoft/typespec/issues/4908 freeze when using
circular model extends with aliases

### Others
FIx https://github.com/microsoft/typespec/issues/4915 (Duplicate usings
not scoped per namespace)

Doesn't resolve the alias circular issue
https://github.com/microsoft/typespec/issues/2824 but I think setup the
solution for fixing it later in the name resolver where we could detect
that cycle instead of the checker

---------

Co-authored-by: Brian Terlson <brian.terlson@microsoft.com>
2024-11-04 23:50:10 +00:00
Jorge Rangel 49c05272f3
[http-client-csharp] Remove incorrect casting for unknown discriminated subtype models (#4963)
fixes: https://github.com/microsoft/typespec/issues/4958
2024-11-04 23:30:18 +00:00
Timothee Guerin 3b17396f9b
Cleanup docusaurus leftover (#4962)
Remove the `@theme` aliasing and update regen docs to render correct
import for starlight
2024-11-04 22:35:31 +00:00
Timothee Guerin 2d7eecff6d
Diagnostic path log relative to current working dir (#4807)
To improve #4806 need to cleanup the path resolution

close https://github.com/microsoft/typespec/issues/2274

### Before


![image](https://github.com/user-attachments/assets/fe2832ed-b794-4c80-b25a-157aeae3bd07)


### After
- From parent folder

![image](https://github.com/user-attachments/assets/e210fd50-e154-4e34-8129-3e6eae8a6018)

- From same folder

![image](https://github.com/user-attachments/assets/fb47894b-70df-4857-9a5f-451c9ece5355)
2024-11-04 22:13:22 +00:00
Timothee Guerin bd664ec553
Collect template instantiation stack (#4806)
#1317

## CLI

![image](https://github.com/user-attachments/assets/de8e30bf-cba8-4908-b687-2c6ce5a93d1b)


## IDE

Error at the original location
<img width="1187" alt="image"
src="https://github.com/user-attachments/assets/02d0b2df-65f7-4c43-b60d-8fab3b569046">

Error at the template instantitiation
<img width="988" alt="image"
src="https://github.com/user-attachments/assets/06785dce-de85-4b1a-842f-fda0a6f87f1a">
2024-11-04 21:06:04 +00:00
Timothee Guerin 65167db027
Java server label (#4961)
Fix csharp and js missing area too
2024-11-04 19:48:51 +00:00
Kyle Zhang f03556b57f
Add new `@tagMetadata` decorator to OpenAPI library (#4834)
fix https://github.com/microsoft/typespec/issues/2220

---------

Co-authored-by: Kyle Zhang <v-zhanh@microsoft.com>
Co-authored-by: Timothee Guerin <timothee.guerin@outlook.com>
2024-11-04 17:04:00 +00:00
Dapeng Zhang 7710c4d7eb
fix a doc issue for `opExample` (#4773)
It should be `@opExample` instead of `@example`.
2024-11-04 07:16:41 +00:00
Haoling Dong baff7608b5
http-client-java, upgrade tcgc to 0.47.4 and cadl-ranch to 0.39.0 (#4941) 2024-11-04 03:36:06 +00:00
Timothee Guerin b2e04a5a4e
Fix doc merge issue (#4954)
Not sure why we didn't catch that in ci, might only be checking that in
pr tools which is not optional
2024-11-02 03:45:08 +00:00
Jorge Rangel 597d794088
[http-client-csharp] fix: use correct discriminator prop name during deserialization (#4953)
fixes : https://github.com/microsoft/typespec/issues/4949
2024-11-01 22:46:35 +00:00
James Chen b47d0398c8
Typespec Generation for Empty Schema #4923 (#4934)
fix #4923

---------

Co-authored-by: Christopher Radek <14189820+chrisradek@users.noreply.github.com>
2024-11-01 21:16:03 +00:00
Jorge Rangel b7d351b35e
[http-client-csharp] fix: gen. unknown discriminator model when discriminator prop exists (#4936)
fixes: https://github.com/microsoft/typespec/issues/4935
2024-11-01 20:11:07 +00:00
subaru 220769ed1c
[http] Add Parameter Decorator `@cookie` to Specify Cookie Parameters (#4761)
close #4739 

- `@typespec/http`
  - add `@cookie` decorator to decorate parameters as cookie parameters
  - add `response-cookie-not-supported` diagnostics
    - to be emitted when response cookies are specified
  - add tests for cookie params
- `@typespec/http-server-javascript`
  - throw UnimplementedError when cookie params came
- `@typespec/openapi3`
  - support cookie param case
  - add tests for cookie params
  
### response cookie design

| in | explicit body | implicit body |
| - | - | - |
| diagnostics | `metadata-ignored` | `response-cookie-not-supported` |
| result | included (unified with other metadata) | NOT included
(prevent breaking change for `set-cookie`) |

---

based on:
- https://github.com/microsoft/typespec/discussions/4721

---------

Co-authored-by: Timothee Guerin <timothee.guerin@outlook.com>
Co-authored-by: Timothee Guerin <tiguerin@microsoft.com>
2024-11-01 19:59:32 +00:00
JoshLove-msft a244ac87f4
Use customized enum name for discriminators (#4947)
Fixes https://github.com/microsoft/typespec/issues/4948
2024-11-01 19:25:16 +00:00
Timothee Guerin ed4ae7495b
Common components for typespec.io and typespec azure website (#4945)
Move more component to the common astro lib for typespec-azure
2024-11-01 18:21:18 +00:00
Timothee Guerin c99e9354be
Add astro utils common private package to reuse for typespec-azure (#4944)
Move some of the custom pieces we had to use into a common package so we
can reuse them
2024-11-01 16:43:29 +00:00
Nisha Bhatia 79f88702b4
Add cadl-ranch structure default sln (#4924)
Fixes: https://github.com/microsoft/typespec/issues/3967
2024-11-01 01:56:50 +00:00
Timothee Guerin 67a0680123
Move docs under astro (#4928)
Current setup makes it very hard to iterate and see output in website as
you have to always `pnpm copy` after a change

last item for https://github.com/microsoft/typespec/issues/2564
2024-10-31 20:10:29 +00:00
Timothee Guerin 151be7fa46
Use allof when building nullable enum (#4727)
fix [#4398](https://github.com/microsoft/typespec/issues/4398)
2024-10-31 19:22:57 +00:00
Christopher Radek 012ec81788
tsp-openapi3 - fixes query decorator arg generation (#4873)
Fixes #4298 

Added tests for all the OpenAPI permutations of query params
explode/style. This also updates tsp generation to be compatible with
the change introduced in `@typespec/http` v0.59.1 where `@query` without
params sets `explode: false` (previously it was not set - which assumed
`explode: true`.)

---------

Co-authored-by: Christopher Radek <Christopher.Radek@microsoft.com>
2024-10-31 19:19:30 +00:00
Timothee Guerin b8462a07b7
generated uri template include explode * for query params (#4932)
fix https://github.com/microsoft/typespec/issues/4881
2024-10-31 19:15:24 +00:00
Sarangan Rajamanickam 69cc41211b
[@typespec/spector] [@typespec/spec-coverage-sdk] - Handle Upload Scenario Manifest (#4920)
Earlier, in the `upload-scenario-manifest` script, I had handled the
multiple paths in a different way (one by one). After working with the
`cadl-ranch-dashboard`, the correct approach is to generate the manifest
file in the same way as coverage file. This PR performs this task.

Here is a snapshot of the modified manifest file:


![image](https://github.com/user-attachments/assets/cf752245-452a-424f-b1ed-86b2965103a0)

Please review and approve the PR. Thanks
2024-10-31 17:39:41 +00:00
JoshLove-msft 40c89073fc
Fix check for determining if abstract serialization method is needed (#4930) 2024-10-31 17:05:37 +00:00
Rodge Fu 81c83ddbba
Restart Typespec Language Server when it's not started before or settings changed (#4912)
1. TypeSpec Language Server would be restarted with new settings when
setting "typespec.tsp-server.path" is changed
2. Typespec Language Server can be restarted properly when the server
wasn't running before
3. Code refactor in vscode extension.

related issues:
#2996, #4765

---------

Co-authored-by: Timothee Guerin <tiguerin@microsoft.com>
2024-10-31 15:27:23 +00:00
Wei Hu fe8f3f1bbc
Update ClientPipelineApi, HttpMessageApi abstraction (#4816)
- Remove unused `ClientPipelineApi.CreateMessage`
- Add `HttpRequestOptionsApi` to `ClientPipelineApi.Send(Async)`
- Replace `HttpMessageApi.ResponseClassifier` with
`HttpMessageApi.ApplyResponseClassifier`
- Make abstraction more generic

This fix is needed for below issues of Azure plugin:
https://github.com/Azure/azure-sdk-for-net/issues/46899
https://github.com/Azure/azure-sdk-for-net/issues/46900
https://github.com/Azure/azure-sdk-for-net/issues/46901
https://github.com/Azure/azure-sdk-for-net/issues/46902
2024-10-31 04:24:33 +00:00
Timothee Guerin 9c95ccda8c
Make use of starlight file tree in our docs (#4917)
<img width="767" alt="image"
src="https://github.com/user-attachments/assets/812bd7b3-7526-4c63-bd1d-11044597a56e">
it is also dynamic, not really useful but looks nice
2024-10-30 23:17:30 +00:00
Jorge Rangel 80f5c4c35f
[http-client-csharp] fix: use correct custom ctor in model factory (#4921)
This PR fixes an issue where the model factory method for a model was
using the incorrect full constructor when the full constructor was
suppressed and customized.

fixes: https://github.com/microsoft/typespec/issues/4830
2024-10-30 22:39:19 +00:00
JoshLove-msft 6d168d399e
Don't check for null for structs (#4922)
Fix to https://github.com/microsoft/typespec/pull/4919
2024-10-30 21:48:05 +00:00
JoshLove-msft 3f13f87333
Fix binary content implicit cast (#4919)
Fixes https://github.com/microsoft/typespec/issues/4916

Found https://github.com/microsoft/typespec/issues/4918 while testing
2024-10-30 20:45:34 +00:00
Christopher Radek d768220122
tsp-openapi3 - support generating summary decorator (#4906)
Fixes #4489 and fixes #4614

This now generates the `@summary` decorator based on either the
Component schema `title` field, or the path item `summary` field.

---------

Co-authored-by: Christopher Radek <Christopher.Radek@microsoft.com>
Co-authored-by: Timothee Guerin <timothee.guerin@outlook.com>
2024-10-30 15:36:52 +00:00
Rodge Fu 5cfd7d08fb
Support completion for tspconfig.yaml file in vscode (#4790)
Support completion for tspconfig.yaml file in vscode

#2049
2024-10-30 14:37:10 +00:00