This PR addresses an issue where required spec properties that were
literals and then customized to another literal type were being
incorrectly included in the public constructor.
fixes: https://github.com/microsoft/typespec/issues/4747
for https://github.com/Azure/cadl-ranch/pull/755, as some tests validate
the exact value of some parameter/property.
for the 2 file with only format change, I guess the reason is Alan
enabled spotless on emitter Java code (so `mvn package` would
automatically format the code)
- bump tsp 0.61.2 and corresponding libraries
- update according to API change
part of https://github.com/Azure/autorest.csharp/issues/5111
---------
Co-authored-by: Mingzhe Huang (from Dev Box) <mingzhehuang@microsoft.com>
One scenario was mislabled as `passOnSuccess` instead of `passOnCode`.
This PR fixes that and one of the file is unused after all the recent
modifications.
Please review and approve the PR. Thanks
As a continuation of https://github.com/microsoft/typespec/pull/4725,
while working on removing the handler for the scenarios in the
`typespec-azure` repository, I found some scenarios need added fix in
the `spector` library.
This PR consists of 2 changes:
1. The header keys must be changed to lowercase before reading and
comparing.
2. If the headers and parameters are array values, then we need to
handle them seperately.
I have tested this change with all the scenarios in both the `typespec`
and `typespec-azure` repositories. Once this change is merged, I can
open the PR for the scenario changes in `typespec-azure` repository.
Please review and approve this PR. Thanks
This PR handles the removal of `handler` property in majority of the
Scenarios. All Scenarios are validated and tested. Please review and
approve the PR. Thanks
Bumps
[astro](https://github.com/withastro/astro/tree/HEAD/packages/astro)
from 4.16.0 to 4.16.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/withastro/astro/releases">astro's
releases</a>.</em></p>
<blockquote>
<h2>astro@4.16.1</h2>
<h3>Patch Changes</h3>
<ul>
<li>
<p><a
href="https://redirect.github.com/withastro/astro/pull/12177">#12177</a>
<a
href="a4ffbfaa5c"><code>a4ffbfa</code></a>
Thanks <a
href="https://github.com/matthewp"><code>@matthewp</code></a>! - Ensure
we target scripts for execution in the router</p>
<p>Using <code>document.scripts</code> is unsafe because if the
application has a <code>name="scripts"</code> this will shadow
the built-in <code>document.scripts</code>. Fix is to use
<code>getElementsByTagName</code> to ensure we're only grabbing real
scripts.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/withastro/astro/pull/12173">#12173</a>
<a
href="2d10de5f21"><code>2d10de5</code></a>
Thanks <a
href="https://github.com/ematipico"><code>@ematipico</code></a>! -
Fixes a bug where Astro Actions couldn't redirect to the correct
pathname when there was a rewrite involved.</p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/withastro/astro/blob/main/packages/astro/CHANGELOG.md">astro's
changelog</a>.</em></p>
<blockquote>
<h2>4.16.1</h2>
<h3>Patch Changes</h3>
<ul>
<li>
<p><a
href="https://redirect.github.com/withastro/astro/pull/12177">#12177</a>
<a
href="a4ffbfaa5c"><code>a4ffbfa</code></a>
Thanks <a
href="https://github.com/matthewp"><code>@matthewp</code></a>! - Ensure
we target scripts for execution in the router</p>
<p>Using <code>document.scripts</code> is unsafe because if the
application has a <code>name="scripts"</code> this will shadow
the built-in <code>document.scripts</code>. Fix is to use
<code>getElementsByTagName</code> to ensure we're only grabbing real
scripts.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/withastro/astro/pull/12173">#12173</a>
<a
href="2d10de5f21"><code>2d10de5</code></a>
Thanks <a
href="https://github.com/ematipico"><code>@ematipico</code></a>! -
Fixes a bug where Astro Actions couldn't redirect to the correct
pathname when there was a rewrite involved.</p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="c73d65d7f7"><code>c73d65d</code></a>
[ci] release (<a
href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/12178">#12178</a>)</li>
<li><a
href="650dd22a7b"><code>650dd22</code></a>
Fix VT video test fail in firefox (<a
href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/12188">#12188</a>)</li>
<li><a
href="58e22bd042"><code>58e22bd</code></a>
[ci] format</li>
<li><a
href="2d10de5f21"><code>2d10de5</code></a>
fix(routing): actions should redirect the original pathname (<a
href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/12173">#12173</a>)</li>
<li><a
href="a4ffbfaa5c"><code>a4ffbfa</code></a>
Ensure router only targets scripts for execution (<a
href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/12177">#12177</a>)</li>
<li><a
href="2f5b28e938"><code>2f5b28e</code></a>
Use p-queue instead of fastq (<a
href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/12189">#12189</a>)</li>
<li><a
href="1f93fca1d3"><code>1f93fca</code></a>
Fix biome lint warning (<a
href="https://github.com/withastro/astro/tree/HEAD/packages/astro/issues/12187">#12187</a>)</li>
<li>See full diff in <a
href="https://github.com/withastro/astro/commits/astro@4.16.1/packages/astro">compare
view</a></li>
</ul>
</details>
<br />
[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=astro&package-manager=npm_and_yarn&previous-version=4.16.0&new-version=4.16.1)](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>
Fixes#4455
Previously, the parameters defined as a child of a `path` were ignored.
Now they are added to the operations defined in each of the path's
methods.
The spec states that duplicates are not allowed in the final
operation-level parameter list, and the more specific (operation level)
replaces the less specific (path level) if there is a collision. A
combination of the location and name uniquely identify a parameter for
these purposes.
Example:
```yml
openapi: 3.0.0
info:
title: (title)
version: 0.0.0
tags: []
paths:
/widgets/{id}:
get:
operationId: Widgets_read
responses:
"200":
description: The request has succeeded.
content:
application/json:
schema:
$ref: "#/components/schemas/Widget"
delete:
operationId: Widgets_delete
responses:
"204":
description: "There is no content to send for this request, but the headers may be useful. "
parameters:
- name: id
in: path
required: true
schema:
type: string
components:
schemas:
Widget:
type: object
required:
- id
properties:
id:
type: string
```
---------
Co-authored-by: Christopher Radek <Christopher.Radek@microsoft.com>
This PR address the following bugs:
- If a model contains a spec property that was also added as a custom
model in it's base model, the derived model will not generate the
property.
- if a custom property is added to a base model and it includes the
`CodeGenSerialization` attribute, that property is included in
serialization ctor for the derived model.
fixes: https://github.com/microsoft/typespec/issues/4629
link https://github.com/Azure/typespec-azure/issues/1487
tested with
```
Union U {
null;
};
```
after this PR, we will see
```
C:/github/typespec/packages/http-client-java/generator/http-client-generator-test/main.tsp:15:7 - error @azure-tools/typespec-client-generator-core/union-null: Cannot have a union containing only null types.
> 15 | union U {
| ^
```
and codegen fails (as this is an error).