- 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.
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>
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>
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>
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
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>
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>
In the `server-test` scenario, if there is an error, then the script
immediately reports the error and comes out of the execution. But, the
service generator has not implemented all the scenarios yet. So, If all
the scenarios are executed, then the script might fail even before
executing the intended script. So, the correct approach would be to
report at the end.
Please review and approve the PR. Thanks
Currently we could execute the `serve`/`server-test`/... command such
as:
`pnpm .\cmd\cli.mjs serve ..\http-specs\specs`
i.e we could provide only one path of scenarios to execute. But, since
we separated the scenarios to azure and non-azure specific cases to 2
different packages, we need a way to execute commands such as:
`pnpm .\cmd\cli.mjs serve ..\http-specs\specs
..\..\..\typespec-azure\packages\azure-http-specs\specs\`
The same procedure must be followed in all other commands such as
`validate-scenarios`, `generate-scenarios-summary`, etc. Since we have
to do it for all the commands and we need to change in all the places,
it is much simpler to do it in one location where we copy the files to
one common temp location and execute from there.
Also, in this PR, I have removed the `private: true` option for all the
5 packages to start the rollout process.
Please review and approve the PR. Thanks
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>
Progress for #2564
Changes:
- Decided to cut versioning for now. Starlight doesn't support well now
and would be a decent amount of work. Our doc have been quite stable and
this slows down the build significantly.\
The plan is as follow
1. Merge this as a parallel build to the docusaurus website
2. Add blog back
3. Cleanup things (like migrate more things out of fluentui react
components)
4. Switch the website to use this one
5. If we are happy delete docusaurus
Fixes: https://github.com/microsoft/typespec/issues/4588
This won't call the post order exit callbacks if recursion stops at
pre-order callbacks.
---------
Co-authored-by: swatikumar <swatikumar@pinterest.com>