-
Notifications
You must be signed in to change notification settings - Fork 221
[tsp-client] Batch generation #13023
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 all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
5b99817
initial impl
cperaltah ec64c7c
improve error
cperaltah 3dc7e58
improve local spec scenario
cperaltah 36824bc
remove extra checks
cperaltah 84b3035
fix logs
cperaltah 2496bc9
add test assets
cperaltah 4b71953
update tests
cperaltah 28c509d
update commit
cperaltah 2f891bb
enable tests
cperaltah 7eed524
clean up imports
cperaltah cae59be
Merge branch 'main' of https://github.com/Azure/azure-sdk-tools into …
cperaltah 6fc2309
fix tests
cperaltah b4298ae
fix error messages
cperaltah 36597a4
Update tools/tsp-client/src/commands.ts
catalinaperalta ef88451
Update tools/tsp-client/src/commands.ts
catalinaperalta b56d692
Update tools/tsp-client/src/fs.ts
catalinaperalta 0a8105b
Update tools/tsp-client/src/npm.ts
catalinaperalta 786d384
Update tools/tsp-client/test/commands.spec.ts
catalinaperalta 1e01a74
Update tools/tsp-client/test/commands.spec.ts
catalinaperalta 5f08f9b
test concurrency
cperaltah 9eb56c3
Merge branch 'tsp-client/batch' of https://github.com/Azure/azure-sdk…
cperaltah e6704b4
format
cperaltah 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
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
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
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,5 @@ | ||
| directory: tools/tsp-client/test/examples/batch/service/rbac | ||
| commit: 2496bc9d427ab109ebee2c1b8fd38f4dcf000cda | ||
| repo: Azure/azure-sdk-tools | ||
| additionalDirectories: | ||
| emitterPackageJsonPath: tools/tsp-client/test/examples/batch/service/package.json |
5 changes: 5 additions & 0 deletions
5
tools/tsp-client/test/examples/batch/restore/tsp-location.yaml
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,5 @@ | ||
| directory: tools/tsp-client/test/examples/batch/service/restore | ||
| commit: 2496bc9d427ab109ebee2c1b8fd38f4dcf000cda | ||
| repo: Azure/azure-sdk-tools | ||
| additionalDirectories: | ||
| emitterPackageJsonPath: tools/tsp-client/test/examples/batch/service/package.json |
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,17 @@ | ||
| { | ||
| "name": "typescript-emitter-package", | ||
| "main": "dist/src/index.js", | ||
| "dependencies": { | ||
| "@azure-tools/typespec-ts": "0.46.1", | ||
| "@azure-tools/typespec-azure-core": "0.62.0", | ||
| "@azure-tools/typespec-autorest": "0.62.0", | ||
| "@azure-tools/typespec-client-generator-core": "0.62.0", | ||
| "@azure-tools/typespec-azure-resource-manager": "0.62.0", | ||
| "@azure-tools/typespec-azure-rulesets": "0.62.0", | ||
| "@azure-tools/typespec-liftr-base": "0.11.0", | ||
| "@typespec/compiler": "1.6.0", | ||
| "@typespec/http": "1.6.0", | ||
| "@typespec/rest": "0.76.0", | ||
| "@typespec/versioning": "0.76.0" | ||
| } | ||
| } |
42 changes: 42 additions & 0 deletions
42
tools/tsp-client/test/examples/batch/service/rbac/main.tsp
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,42 @@ | ||
| import "@typespec/rest"; | ||
| import "@typespec/http"; | ||
| import "@typespec/versioning"; | ||
| import "@azure-tools/typespec-azure-core"; | ||
|
|
||
| using TypeSpec.Http; | ||
| using TypeSpec.Rest; | ||
| using TypeSpec.Versioning; | ||
| using Azure.Core; | ||
|
|
||
| /** | ||
| * The key vault client performs cryptographic key operations and vault operations against the Key Vault service. | ||
| */ | ||
| @useAuth( | ||
| OAuth2Auth<[ | ||
| { | ||
| type: OAuth2FlowType.implicit, | ||
| authorizationUrl: "https://login.microsoftonline.com/common/oauth2/authorize", | ||
| scopes: ["https://vault.azure.net/.default"], | ||
| } | ||
| ]> | ||
| ) | ||
| @service(#{ title: "KeyVaultClient" }) | ||
| @versioned(Versions) | ||
| @server( | ||
| "{vaultBaseUrl}", | ||
| "The key vault client performs cryptographic key operations and vault operations against the Key Vault service.", | ||
| { | ||
| vaultBaseUrl: url, | ||
| } | ||
| ) | ||
| namespace KeyVault.RBAC; | ||
|
|
||
| /** | ||
| * The available API versions. | ||
| */ | ||
| enum Versions { | ||
| /** | ||
| * The 2025-07-01 API version. | ||
| */ | ||
| v2025_07_01: "2025-07-01", | ||
| } |
34 changes: 34 additions & 0 deletions
34
tools/tsp-client/test/examples/batch/service/rbac/tspconfig.yaml
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,34 @@ | ||
| parameters: | ||
| "service-dir": | ||
| default: "sdk/keyvault" | ||
| "dependencies": | ||
| default: "" | ||
| emit: | ||
| # - "@azure-tools/typespec-autorest" | ||
| options: | ||
| "@azure-tools/typespec-autorest": | ||
| azure-resource-provider-folder: "data-plane" | ||
| emitter-output-dir: "{project-root}/.." | ||
| output-file: "{azure-resource-provider-folder}/Microsoft.KeyVault/{version-status}/{version}/rbac.json" | ||
| "@azure-tools/typespec-ts": | ||
| emitter-output-dir: "{output-dir}/{service-dir}/keyvault-admin/rbac" | ||
| generate-metadata: true | ||
| src-folder: "src/generated/rbac" | ||
| experimental-extensible-enums: true | ||
| is-modular-library: true | ||
| package-details: | ||
| name: "@azure/keyvault-admin" | ||
| description: "Azure Key Vault Administration" | ||
| flavor: azure | ||
| "@azure-tools/typespec-go": | ||
| containing-module: "github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azadmin" | ||
| service-dir: "sdk/security/keyvault" | ||
| emitter-output-dir: "{output-dir}/{service-dir}/azadmin/rbac" | ||
| go-generate: build.go | ||
| inject-spans: true | ||
| single-client: true | ||
| generate-fakes: true | ||
| omit-constructors: true | ||
| "@azure-tools/typespec-client-generator-cli": | ||
| additionalDirectories: | ||
| - "specification/keyvault/Security.KeyVault.Common/" |
Oops, something went wrong.
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.