-
Notifications
You must be signed in to change notification settings - Fork 78
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
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 f1aaee0
Merge branch 'main' of https://github.com/Azure/autorest.typescript i…
v-jiaodi 3911246
Merge branch 'main' into monitor-nightly43
v-jiaodi 7c0e9b8
Merge branch 'main' of https://github.com/Azure/autorest.typescript i…
v-jiaodi 6fc79bf
regen
v-jiaodi d827904
Merge branch 'main' of https://github.com/Azure/autorest.typescript i…
v-jiaodi 45750c1
Merge branch 'main' into monitor-nightly43
MaryGao 199949a
Merge branch 'main' into monitor-nightly43
MaryGao 8b593ec
update
v-jiaodi 11dd719
revert
v-jiaodi 5410a17
regen smoke
v-jiaodi c44ea2e
Fix the empty client issue
MaryGao edcabfc
skip case
v-jiaodi 1d68200
Merge branch 'monitor-nightly43' of https://github.com/v-jiaodi/autor…
v-jiaodi 193aa74
regen code
v-jiaodi 0d97ec9
update
v-jiaodi acce792
update case
v-jiaodi c360fb0
Merge branch 'main' into monitor-nightly43
MaryGao 2bf1c3c
update package version
v-jiaodi fe278ea
use latest dev for tcgc
v-jiaodi 8e13496
update package version
v-jiaodi 648771b
Merge branch 'main' into monitor-nightly43
v-jiaodi b952833
Upgrade to dev 3 version for tcgc to support optional path parameter
MaryGao fc7b4c8
Add test cases for optional path and remove useless codes
MaryGao 398e84a
Format codes
MaryGao b2189b4
add test case for path
v-jiaodi 9e0c260
format
v-jiaodi f34479a
update
v-jiaodi b74e6b6
Update packages/typespec-ts/test/azureModularIntegration/pathParamete…
MaryGao e8b9903
Update packages/typespec-ts/test/azureModularIntegration/pathParamete…
MaryGao c9a4eff
add ut
v-jiaodi 9d072f0
Merge branch 'monitor-nightly43' of https://github.com/v-jiaodi/autor…
v-jiaodi 50013b4
update case
v-jiaodi e26c82d
Remove the case
MaryGao 0f7d5a1
Remove useless parameter
MaryGao 602b213
fix ci
v-jiaodi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
55 changes: 55 additions & 0 deletions
55
packages/typespec-ts/test/modularUnit/scenarios/operations/emptyOperation.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} | ||
``` |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.