Skip to content

Support optional path parameter for Modular #3152

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

Merged
merged 36 commits into from
Apr 28, 2025
Merged
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
0e4ed89
update package to next
v-jiaodi Apr 3, 2025
f1aaee0
Merge branch 'main' of https://github.com/Azure/autorest.typescript i…
v-jiaodi Apr 7, 2025
3911246
Merge branch 'main' into monitor-nightly43
v-jiaodi Apr 10, 2025
7c0e9b8
Merge branch 'main' of https://github.com/Azure/autorest.typescript i…
v-jiaodi Apr 14, 2025
6fc79bf
regen
v-jiaodi Apr 14, 2025
d827904
Merge branch 'main' of https://github.com/Azure/autorest.typescript i…
v-jiaodi Apr 14, 2025
45750c1
Merge branch 'main' into monitor-nightly43
MaryGao Apr 15, 2025
199949a
Merge branch 'main' into monitor-nightly43
MaryGao Apr 21, 2025
8b593ec
update
v-jiaodi Apr 21, 2025
11dd719
revert
v-jiaodi Apr 21, 2025
5410a17
regen smoke
v-jiaodi Apr 21, 2025
c44ea2e
Fix the empty client issue
MaryGao Apr 22, 2025
edcabfc
skip case
v-jiaodi Apr 22, 2025
1d68200
Merge branch 'monitor-nightly43' of https://github.com/v-jiaodi/autor…
v-jiaodi Apr 22, 2025
193aa74
regen code
v-jiaodi Apr 22, 2025
0d97ec9
update
v-jiaodi Apr 23, 2025
acce792
update case
v-jiaodi Apr 23, 2025
c360fb0
Merge branch 'main' into monitor-nightly43
MaryGao Apr 27, 2025
2bf1c3c
update package version
v-jiaodi Apr 27, 2025
fe278ea
use latest dev for tcgc
v-jiaodi Apr 27, 2025
8e13496
update package version
v-jiaodi Apr 27, 2025
648771b
Merge branch 'main' into monitor-nightly43
v-jiaodi Apr 27, 2025
b952833
Upgrade to dev 3 version for tcgc to support optional path parameter
MaryGao Apr 27, 2025
fc7b4c8
Add test cases for optional path and remove useless codes
MaryGao Apr 27, 2025
398e84a
Format codes
MaryGao Apr 27, 2025
b2189b4
add test case for path
v-jiaodi Apr 27, 2025
9e0c260
format
v-jiaodi Apr 27, 2025
f34479a
update
v-jiaodi Apr 27, 2025
b74e6b6
Update packages/typespec-ts/test/azureModularIntegration/pathParamete…
MaryGao Apr 27, 2025
e8b9903
Update packages/typespec-ts/test/azureModularIntegration/pathParamete…
MaryGao Apr 27, 2025
c9a4eff
add ut
v-jiaodi Apr 27, 2025
9d072f0
Merge branch 'monitor-nightly43' of https://github.com/v-jiaodi/autor…
v-jiaodi Apr 27, 2025
50013b4
update case
v-jiaodi Apr 28, 2025
e26c82d
Remove the case
MaryGao Apr 28, 2025
0f7d5a1
Remove useless parameter
MaryGao Apr 28, 2025
602b213
fix ci
v-jiaodi Apr 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# generate empty operation for classic client

## TypeSpec

```tsp
model Test {
@query
"api-version": string;
}
model Foo {
id: string;
}
op test(): string;
```

## models

```ts models
// (file was not generated)
```

## classicClient

```ts classicClient
import { TestOptionalParams } from "./api/options.js";
import { test } from "./api/operations.js";
import { Pipeline } from "@azure/core-rest-pipeline";

export { TestingClientOptionalParams } from "./api/testingContext.js";

export class TestingClient {
private _client: TestingContext;
/** The pipeline used by this client to make requests */
public readonly pipeline: Pipeline;

constructor(
endpointParam: string,
options: TestingClientOptionalParams = {}
) {
const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;
const userAgentPrefix = prefixFromOptions
? `${prefixFromOptions} azsdk-js-client`
: `azsdk-js-client`;
this._client = createTesting(endpointParam, {
...options,
userAgentOptions: { userAgentPrefix }
});
this.pipeline = this._client.pipeline;
}

test(options: TestOptionalParams = { requestOptions: {} }): Promise<string> {
return test(this._client, options);
}
}
```