Skip to content
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

Feature: Update kiota vs code extension #4500

Merged
merged 211 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from 108 commits
Commits
Show all changes
211 commits
Select commit Hold shift + click to select a range
f62c322
add tree view
ElinorW Apr 3, 2024
f62cdfa
add Api files conatiner and remove previous containers
ElinorW Apr 11, 2024
45d5b42
rename workspace title
ElinorW Apr 15, 2024
d9b921f
combine search and open description functions
ElinorW Apr 16, 2024
59b662a
Merge branch 'main' into elinor/add-kiota-workspace
ElinorW Apr 17, 2024
1a1d1c4
Add 'close description' button to api title node
ElinorW Apr 17, 2024
1431b90
add close description dialog
ElinorW Apr 17, 2024
9c84f5c
add generate option step
ElinorW Apr 17, 2024
df0618f
added plugin dialog steps
ElinorW Apr 22, 2024
3678c34
added icon toggling
ElinorW Apr 22, 2024
50f73ea
add workspace.json file to workspace
ElinorW Apr 23, 2024
866fbd1
Merge branch 'feature/plugin' into elinor/add-kiota-workspace
ElinorW Apr 23, 2024
75eb6df
Fix some server configs
Apr 26, 2024
58cb7e3
Merge remote-tracking branch 'origin/main' into elinor/add-kiota-work…
Apr 26, 2024
0b460d4
Merge branch 'main' into elinor/add-kiota-workspace
baywet Apr 26, 2024
ff8f0fa
Ensure the RPC commands use preview features if config is enabled.
Apr 26, 2024
ab2f99e
- updates references kiota version for CLI
baywet Apr 26, 2024
d3947b3
- cleans up localization files from unused resource
baywet Apr 26, 2024
d440b29
- removes unimplemented command
baywet Apr 26, 2024
807fc00
- adds the environment variable passing to the json RPC server
baywet Apr 26, 2024
e93920f
- refactors to constant
baywet Apr 26, 2024
cc0f413
- removes serializers in preview mode
baywet Apr 26, 2024
e71d83f
- code linting
baywet Apr 26, 2024
cd183a0
- initial plugin generation
baywet Apr 26, 2024
9c80f34
Merge pull request #4562 from microsoft/andrueastman/fixExtensionRpcs
andrueastman Apr 30, 2024
0e151b0
Merge branch 'main' into elinor/add-kiota-workspace
ElinorW Apr 30, 2024
161bae1
Fixed the collection of plugin name
Apr 30, 2024
fc6148f
Merge branch 'main' into elinor/add-kiota-workspace
andrueastman May 2, 2024
8b3ec49
Merge branch 'main' into elinor/add-kiota-workspace
baywet May 2, 2024
88dde13
rename title string
ElinorW May 2, 2024
056540d
Add plugin type step
ElinorW May 2, 2024
9bb134d
add generate a manifest type
ElinorW May 2, 2024
aa45716
close description after generation
ElinorW May 2, 2024
2c42eda
add "Edit Path' button
ElinorW May 8, 2024
564ed03
add regenerate call
ElinorW May 8, 2024
4174297
update file name
ElinorW May 8, 2024
9e8e8d9
enable editing paths on api explorer
ElinorW May 8, 2024
236fae6
Merge branch 'main' into elinor/add-kiota-workspace
ElinorW May 9, 2024
8b629ab
add regenerate functionality
ElinorW May 9, 2024
f781016
Merge branch 'main' into elinor/add-kiota-workspace
baywet May 10, 2024
5db4e6d
- bumps kiota versions to avoid updates which confuses @sebastienleve…
baywet May 10, 2024
6d1d8b6
- adds FAQ documentation for vs code reinstalling over
baywet May 10, 2024
b03f5b2
Merge branch 'main' into elinor/add-kiota-workspace
ElinorW May 13, 2024
2bebba5
add regeneration button on api explorer
ElinorW May 13, 2024
b21736a
remove automatic workspace.json file add
ElinorW May 13, 2024
3bcc0e6
replace string
ElinorW May 14, 2024
45afefd
update icon
ElinorW May 14, 2024
93c3b13
add plugin re-generation
ElinorW May 14, 2024
d187094
add warning notification
ElinorW May 14, 2024
cb2ef16
add save notification
ElinorW May 14, 2024
2773039
fix delete description appearing on wrong nodes
ElinorW May 16, 2024
38a1a65
remove open file command
ElinorW May 16, 2024
f34a458
remove output path validation and default to ouptut folder
ElinorW May 16, 2024
0e325f9
move constants to separate file
ElinorW May 16, 2024
f173582
Merge branch 'main' into elinor/add-kiota-workspace
baywet May 16, 2024
8688a3c
remove path autoselection when description is loaded for the first time
ElinorW May 16, 2024
6fa3212
fix workspace.json file not opening
ElinorW May 16, 2024
dbb8e27
Merge branch 'elinor/add-kiota-workspace' of https://github.com/micro…
ElinorW May 16, 2024
2e7d4df
hide add and remove icon on apiTitle node
ElinorW May 16, 2024
5bfe675
undo closing descriptions after generation
ElinorW May 17, 2024
aaddbfd
Merge branch 'main' into elinor/add-kiota-workspace
ElinorW May 17, 2024
3d49d8d
Merge branch 'elinor/add-kiota-workspace' of https://github.com/micro…
ElinorW May 17, 2024
6f1c049
Adding the automatic sideloading script
sebastienlevert May 17, 2024
1fce6c8
Update to using vsx
sebastienlevert May 17, 2024
2a0db34
fix icons display
ElinorW May 20, 2024
18d6b2b
Merge branch 'main' into elinor/add-kiota-workspace
ElinorW May 20, 2024
2bbf301
Merge branch 'main' into elinor/add-kiota-workspace
ElinorW May 20, 2024
1768c4d
Merge branch 'elinor/add-kiota-workspace' of https://github.com/micro…
ElinorW May 20, 2024
9b5c9be
Merge branch 'main' into elinor/add-kiota-workspace
ElinorW May 21, 2024
669348d
remove welcome translations
ElinorW May 21, 2024
65558cb
remove welcome string translation
ElinorW May 21, 2024
7b03451
add string translations
ElinorW May 21, 2024
3476f3f
remove unused search lock function
ElinorW May 21, 2024
858d4cd
add french translations
ElinorW May 21, 2024
e877581
added czech translations
ElinorW May 21, 2024
8f4a32f
add portuguese translations
ElinorW May 21, 2024
284e59d
update output diectory string
ElinorW May 21, 2024
d0ec92f
set workspace file constant
ElinorW May 21, 2024
74aaf10
add else clause
ElinorW May 21, 2024
d513b8a
remove TODO comments
ElinorW May 21, 2024
07ceaa4
return vscode error
ElinorW May 21, 2024
77cba1e
add types
ElinorW May 21, 2024
6c8f59c
use nullish coalescing operator instead of Logical OR
ElinorW May 21, 2024
cb3513e
add spanish translations
ElinorW May 22, 2024
d5823aa
add italian translation
ElinorW May 22, 2024
8dd5e5c
add chinese translations
ElinorW May 22, 2024
a880d30
remove unused functions
ElinorW May 22, 2024
cbd508e
update static strings
ElinorW May 22, 2024
bf1e227
add missing l10n
ElinorW May 22, 2024
1650da1
update string typo
ElinorW May 22, 2024
8377932
update static string localization files
ElinorW May 22, 2024
6ebfac1
update french string
ElinorW May 22, 2024
469108d
remove else
ElinorW May 23, 2024
bc03997
Merge branch 'main' into elinor/add-kiota-workspace
baywet May 23, 2024
a45c61d
Merge pull request #4676 from sebastienlevert/sebastienlevert/sideloa…
baywet May 23, 2024
e2cfdf8
add plugin output selection
ElinorW May 23, 2024
9551fa8
add output directory selection for client generation
ElinorW May 23, 2024
4730105
add output directory selection for manifest generation
ElinorW May 23, 2024
22cf4a2
Merge branch 'elinor/add-kiota-workspace' of https://github.com/micro…
ElinorW May 23, 2024
2634835
Merge branch 'main' into elinor/add-kiota-workspace
andrueastman May 24, 2024
8e0d429
add polish translations
ElinorW May 24, 2024
b98b8c1
add russian translations
ElinorW May 24, 2024
880a61b
add swahili translations
ElinorW May 24, 2024
337856e
add success message and toggle icons
ElinorW May 24, 2024
d969270
Merge branch 'elinor/add-kiota-workspace' of https://github.com/micro…
ElinorW May 24, 2024
fe57457
add constants
ElinorW May 24, 2024
d14cdab
localize string
ElinorW May 27, 2024
c3de6d2
add default and browse output options
ElinorW May 27, 2024
972b8e3
add dropdown for api path selection
ElinorW May 29, 2024
94f713e
remove unused filter property
ElinorW May 29, 2024
c63339a
Merge branch 'main' into elinor/add-kiota-workspace
ElinorW May 29, 2024
d86275b
remove else
ElinorW May 30, 2024
2045df0
Merge pull request #4742 from microsoft/elinor/add-api-path-selection
ElinorW May 30, 2024
ccdc4e4
Merge branch 'main' into elinor/add-kiota-workspace
ElinorW May 30, 2024
d3a2b11
update icon
ElinorW May 30, 2024
6258833
Fixing vscode sideloading script for Windows
sebastienlevert Jun 3, 2024
1fd3f7e
Merge branch 'microsoft:elinor/add-kiota-workspace' into elinor/add-k…
sebastienlevert Jun 3, 2024
2c32919
enable generation from a deeplink
ElinorW Jun 4, 2024
6285127
Merge branch 'main' into elinor/add-kiota-workspace
ElinorW Jun 4, 2024
5d58b7c
Merge branch 'andrueastman/renamePlugin' into andrueastman/renamePlug…
Jun 5, 2024
0e05d3a
Merge branch 'main' into elinor/add-kiota-workspace
ElinorW Jun 5, 2024
a16590e
Merge remote-tracking branch 'origin/main' into andrueastman/renamePl…
Jun 5, 2024
8cc6fb4
Updates plugin naming
Jun 5, 2024
c703500
Merge branch 'main' into elinor/add-kiota-workspace
andrueastman Jun 5, 2024
45acf73
Merge remote-tracking branch 'origin/elinor/add-kiota-workspace' into…
Jun 5, 2024
9e3cb83
Merge pull request #4764 from sebastienlevert/elinor/add-kiota-workspace
andrueastman Jun 5, 2024
6a32fd0
Merge branch 'main' into elinor/add-kiota-workspace
andrueastman Jun 6, 2024
6b92cb3
Merge branch 'elinor/add-kiota-workspace' into andrueastman/renamePlu…
andrueastman Jun 6, 2024
521a828
Merge pull request #4787 from microsoft/andrueastman/renamePluginCode
ElinorW Jun 6, 2024
b55e24f
Merge branch 'main' into elinor/add-kiota-workspace
ElinorW Jun 10, 2024
def06cf
update vscode engine
ElinorW Jun 10, 2024
b2193e4
Merge branch 'main' into elinor/add-kiota-workspace
ElinorW Jun 12, 2024
c0ad798
bump kiota extension version
ElinorW Jun 12, 2024
4c97bf4
Task: Display client/plugin name on API explorer (#4801)
ElinorW Jun 13, 2024
f6280cb
Merge branch 'main' into elinor/add-kiota-workspace
ElinorW Jun 13, 2024
a357533
hide information messages
ElinorW Jun 13, 2024
8654d3d
update warning message display
ElinorW Jun 13, 2024
9de1511
Merge branch 'main' into elinor/add-kiota-workspace
baywet Jun 13, 2024
658d832
Merge branch 'main' into elinor/add-kiota-workspace
baywet Jun 18, 2024
d1f1c86
Merge branch 'main' into elinor/add-kiota-workspace
ElinorW Jun 27, 2024
660048d
update regenerate function
ElinorW Jun 28, 2024
395a42b
Add constants
ElinorW Jun 28, 2024
361d3ae
Fix: "Override" message only displays if there's a change on the tree…
ElinorW Jun 28, 2024
af0cd0b
Merge branch 'elinor/add-kiota-workspace' into elinor/fix-regeneratio…
ElinorW Jun 28, 2024
d975dc3
code clean up
ElinorW Jul 1, 2024
21d3c70
Merge branch 'elinor/fix-regeneration-issue' of https://github.com/mi…
ElinorW Jul 1, 2024
9a17b52
update plugin type to accept array
ElinorW Jul 1, 2024
7db3e0c
Merge pull request #4904 from microsoft/elinor/fix-regeneration-issue
baywet Jul 2, 2024
b38066e
Merge pull request #4917 from microsoft/elinor/multiple-plugin-support
baywet Jul 2, 2024
03edf32
Merge branch 'main' into elinor/add-kiota-workspace
ElinorW Jul 2, 2024
30d12af
Merge branch 'main' into elinor/add-kiota-workspace
baywet Jul 3, 2024
1ef763a
Merge branch 'main' into elinor/add-kiota-workspace
baywet Jul 4, 2024
f195c6e
chore: lock update
baywet Jul 4, 2024
7eba6f6
Merge branch 'main' into elinor/add-kiota-workspace
baywet Jul 5, 2024
099f0a3
chore: bumps version to avoid auto-update
baywet Jul 5, 2024
bee1633
Merge remote-tracking branch 'origin/main' into elinor/add-kiota-work…
Jul 11, 2024
868b14c
Fixes unselected paths
Jul 11, 2024
10dd282
format
Jul 11, 2024
a2a205d
Merge branch 'main' into elinor/add-kiota-workspace
baywet Jul 11, 2024
4fc7dd3
Merge pull request #4960 from microsoft/andrueastman/fixMissingNodes
andrueastman Jul 11, 2024
15064a4
fix regeneration
ElinorW Jul 12, 2024
9aca89e
Merge branch 'main' into elinor/add-kiota-workspace
andrueastman Jul 15, 2024
fc3a34e
API change to migrate lockfile to workspace file
Jul 15, 2024
5097c03
Adds connections to migrate workspace file
Jul 15, 2024
affd017
Merge pull request #4973 from microsoft/andrueastman/migrateHandler
baywet Jul 15, 2024
49df293
Fix path maching
Jul 16, 2024
476ba16
Update vscode/microsoft-kiota/src/openApiTreeProvider.ts
baywet Jul 16, 2024
dd35ec6
Merge pull request #4981 from microsoft/andrueastman/fixFiltering
baywet Jul 16, 2024
7035889
Merge branch 'main' into elinor/add-kiota-workspace
andrueastman Jul 17, 2024
19366c7
Fixes plugin generation check
Jul 17, 2024
f0d3d97
Merge pull request #4989 from microsoft/andrueastman/fixpluginGeneration
baywet Jul 17, 2024
7ffb864
Fix: Add paste path functionality (#4994)
ElinorW Jul 22, 2024
1ca7aff
Merge branch 'main' into elinor/add-kiota-workspace
ElinorW Jul 25, 2024
cbea6da
Fix: Kiota extension works without a workspace folder open (#4958)
ElinorW Jul 26, 2024
5df07fe
Merge branch 'main' into elinor/add-kiota-workspace
ElinorW Jul 26, 2024
22089d6
Merge branch 'main' into elinor/add-kiota-workspace
baywet Jul 26, 2024
c6d2789
Merge branch 'main' into elinor/add-kiota-workspace
ElinorW Jul 29, 2024
72e3f8b
Fix: Workspace file display (#5029)
ElinorW Jul 29, 2024
48f3d9f
Fix: Display "override" message only when changes have been made (#5048)
ElinorW Aug 1, 2024
8d24ff9
Merge branch 'main' into elinor/add-kiota-workspace
ElinorW Aug 1, 2024
f3b649a
Merge branch 'main' into elinor/add-kiota-workspace
ElinorW Aug 7, 2024
3f85f95
fix typo issue
ElinorW Aug 7, 2024
c340bbf
fix typecase
ElinorW Aug 7, 2024
211335f
fix cwd update
ElinorW Aug 7, 2024
030fa62
Merge branch 'main' into elinor/add-kiota-workspace
ElinorW Aug 8, 2024
8741217
Merge branch 'main' into elinor/add-kiota-workspace
baywet Aug 9, 2024
dd99a3f
Merge branch 'main' into elinor/add-kiota-workspace
baywet Aug 12, 2024
c900844
chore: bumps extension engine version
baywet Aug 12, 2024
2178d47
chore: updates lock file
baywet Aug 12, 2024
67bbbb1
Merge branch 'main' into elinor/add-kiota-workspace
baywet Aug 13, 2024
8f5f368
Feat: Add migration dialog (#5144)
ElinorW Aug 15, 2024
b9881af
Merge branch 'main' into elinor/add-kiota-workspace
ElinorW Aug 15, 2024
f47a10f
chore: adds missing french translations
baywet Aug 15, 2024
51f4866
Merge branch 'main' into elinor/add-kiota-workspace
ElinorW Aug 16, 2024
502ca35
add missing translations
ElinorW Aug 19, 2024
a896c99
Merge branch 'elinor/add-kiota-workspace' of https://github.com/micro…
ElinorW Aug 19, 2024
db54676
simpify function
ElinorW Aug 19, 2024
80c9fde
rename function
ElinorW Aug 19, 2024
4705d68
Merge branch 'main' into elinor/add-kiota-workspace
ElinorW Aug 19, 2024
5eb1083
Merge branch 'main' into elinor/add-kiota-workspace
ElinorW Aug 19, 2024
04725b6
fix: bumps vscode extension version to allow side-loading
baywet Aug 19, 2024
55f5c44
update message display
ElinorW Aug 19, 2024
e04a4d5
Merge branch 'elinor/add-kiota-workspace' of https://github.com/micro…
ElinorW Aug 19, 2024
99cf661
use workspace instead of lock
ElinorW Aug 20, 2024
8da95e9
use workspaceFile instead
ElinorW Aug 20, 2024
1f0d881
format file
ElinorW Aug 20, 2024
25b3944
Merge branch 'main' into elinor/add-kiota-workspace
ElinorW Aug 20, 2024
619b658
add missing translations
ElinorW Aug 20, 2024
1a1620c
Merge branch 'elinor/add-kiota-workspace' of https://github.com/micro…
ElinorW Aug 20, 2024
3e62e15
update function name
ElinorW Aug 20, 2024
8c9f084
format file
ElinorW Aug 20, 2024
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
36 changes: 36 additions & 0 deletions scripts/execute-vscode-sideload.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
param (
[string]
[Parameter(Mandatory = $false)]
$Platform = "win-x64",
[switch]
$WSL
)


Push-Location ./vscode/microsoft-kiota

# Install all dependencies
npm i

# Package the VS Code extension
npx @vscode/vsce package

# Getting package for its version
$PackageJson = Get-Content "package.json" -Raw | ConvertFrom-Json

# Install the extension
code --install-extension "./kiota-$($PackageJson.version).vsix"

$VsCodeRootPath = "~/.vscode"

if ($WSL) {
$Platform = "linux-x64"
$VsCodeRootPath = "~/.vscode-server"
}

$KiotaBin = "$VsCodeRootPath/extensions/ms-graph.kiota-$($PackageJson.version)/.kiotabin/$($PackageJson.kiotaVersion)/$Platform"

Pop-Location

# Building Kiota
dotnet publish ./src/kiota/kiota.csproj -p:PublishSingleFile=true -p:PublishReadyToRun=true --self-contained -c Release -r $platform -o $KiotaBin
4 changes: 2 additions & 2 deletions src/kiota/Rpc/IServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Task<SearchOperationResult> SearchAsync(string searchTerm, bool clearCache, CancellationToken cancellationToken);
Task<ShowResult> ShowAsync(string descriptionPath, string[] includeFilters, string[] excludeFilters, bool clearCache, CancellationToken cancellationToken);
Task<ManifestResult> GetManifestDetailsAsync(string manifestPath, string apiIdentifier, bool clearCache, CancellationToken cancellationToken);
Task<List<LogEntry>> GenerateAsync(string openAPIFilePath, string outputPath, GenerationLanguage language, string[] includePatterns, string[] excludePatterns, string clientClassName, string clientNamespaceName, bool usesBackingStore, bool cleanOutput, bool clearCache, bool excludeBackwardCompatible, string[] disabledValidationRules, string[] serializers, string[] deserializers, string[] structuredMimeTypes, bool includeAdditionalData, CancellationToken cancellationToken);
Task<List<LogEntry>> GenerateAsync(string openAPIFilePath, string outputPath, GenerationLanguage language, string[] includePatterns, string[] excludePatterns, string clientClassName, string clientNamespaceName, bool usesBackingStore, bool cleanOutput, bool clearCache, bool excludeBackwardCompatible, string[] disabledValidationRules, string[] serializers, string[] deserializers, string[] structuredMimeTypes, bool includeAdditionalData, ConsumerOperation operation, CancellationToken cancellationToken);

Check warning on line 13 in src/kiota/Rpc/IServer.cs

View workflow job for this annotation

GitHub Actions / Build

Method has 18 parameters, which is greater than the 7 authorized. (https://rules.sonarsource.com/csharp/RSPEC-107)
Task<LanguagesInformation> InfoForDescriptionAsync(string descriptionPath, bool clearCache, CancellationToken cancellationToken);
Task<List<LogEntry>> GeneratePluginAsync(string openAPIFilePath, string outputPath, PluginType[] pluginTypes, string[] includePatterns, string[] excludePatterns, string clientClassName, bool cleanOutput, bool clearCache, string[] disabledValidationRules, CancellationToken cancellationToken);
Task<List<LogEntry>> GeneratePluginAsync(string openAPIFilePath, string outputPath, PluginType[] pluginTypes, string[] includePatterns, string[] excludePatterns, string clientClassName, bool cleanOutput, bool clearCache, string[] disabledValidationRules, ConsumerOperation operation, CancellationToken cancellationToken);

Check warning on line 15 in src/kiota/Rpc/IServer.cs

View workflow job for this annotation

GitHub Actions / Build

Method has 11 parameters, which is greater than the 7 authorized. (https://rules.sonarsource.com/csharp/RSPEC-107)
}
8 changes: 4 additions & 4 deletions src/kiota/Rpc/Server.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@
_ = await Task.WhenAll(configurations
.Select(x => GenerateClientAsync(x, logger, cancellationToken)));
foreach (var (lockInfo, lockDirectoryPath) in locks)
logger.LogInformation("Update of {clientClassName} client for {language} at {lockDirectoryPath} completed", lockInfo?.ClientClassName, lockInfo?.Language, lockDirectoryPath);

Check warning on line 71 in src/kiota/Rpc/Server.cs

View workflow job for this annotation

GitHub Actions / Build

Use PascalCase for named placeholders. (https://rules.sonarsource.com/csharp/RSPEC-6678)
logger.LogInformation("Update of {length} clients completed successfully", locks.Length);

Check warning on line 72 in src/kiota/Rpc/Server.cs

View workflow job for this annotation

GitHub Actions / Build

Use PascalCase for named placeholders. (https://rules.sonarsource.com/csharp/RSPEC-6678)
}
catch (Exception ex)
{
logger.LogCritical("error updating the client: {exceptionMessage}", ex.Message);

Check warning on line 76 in src/kiota/Rpc/Server.cs

View workflow job for this annotation

GitHub Actions / Build

Logging in a catch clause should pass the caught exception as a parameter. (https://rules.sonarsource.com/csharp/RSPEC-6667)

Check warning on line 76 in src/kiota/Rpc/Server.cs

View workflow job for this annotation

GitHub Actions / Build

Use PascalCase for named placeholders. (https://rules.sonarsource.com/csharp/RSPEC-6678)
}
return logger.LogEntries;
}
Expand Down Expand Up @@ -137,7 +137,7 @@
return indexingNormalizationRegex().Replace(name, "{}");
return name;
}
public async Task<List<LogEntry>> GenerateAsync(string openAPIFilePath, string outputPath, GenerationLanguage language, string[] includePatterns, string[] excludePatterns, string clientClassName, string clientNamespaceName, bool usesBackingStore, bool cleanOutput, bool clearCache, bool excludeBackwardCompatible, string[] disabledValidationRules, string[] serializers, string[] deserializers, string[] structuredMimeTypes, bool includeAdditionalData, CancellationToken cancellationToken)
public async Task<List<LogEntry>> GenerateAsync(string openAPIFilePath, string outputPath, GenerationLanguage language, string[] includePatterns, string[] excludePatterns, string clientClassName, string clientNamespaceName, bool usesBackingStore, bool cleanOutput, bool clearCache, bool excludeBackwardCompatible, string[] disabledValidationRules, string[] serializers, string[] deserializers, string[] structuredMimeTypes, bool includeAdditionalData, ConsumerOperation operation, CancellationToken cancellationToken)
{
var logger = new ForwardedLogger<KiotaBuilder>();
var configuration = Configuration.Generation;
Expand All @@ -151,7 +151,7 @@
configuration.ClearCache = clearCache;
configuration.ExcludeBackwardCompatible = excludeBackwardCompatible;
configuration.IncludeAdditionalData = includeAdditionalData;
configuration.Operation = ConsumerOperation.Add; //TODO should be updated to edit in the edit scenario
configuration.Operation = operation;
if (disabledValidationRules is { Length: > 0 })
configuration.DisabledValidationRules = disabledValidationRules.ToHashSet(StringComparer.OrdinalIgnoreCase);
if (serializers is { Length: > 0 })
Expand All @@ -173,17 +173,17 @@
{
var result = await GenerateClientAsync(configuration, logger, cancellationToken);
if (result)
logger.LogInformation("Generation of {clientClassName} client for {language} at {outputPath} completed", configuration.ClientClassName, configuration.Language, configuration.OutputPath);

Check warning on line 176 in src/kiota/Rpc/Server.cs

View workflow job for this annotation

GitHub Actions / Build

Use PascalCase for named placeholders. (https://rules.sonarsource.com/csharp/RSPEC-6678)
else
logger.LogInformation("Client generation skipped, client is up to date");
}
catch (Exception ex)
{
logger.LogCritical("error generating the client: {exceptionMessage}", ex.Message);

Check warning on line 182 in src/kiota/Rpc/Server.cs

View workflow job for this annotation

GitHub Actions / Build

Logging in a catch clause should pass the caught exception as a parameter. (https://rules.sonarsource.com/csharp/RSPEC-6667)

Check warning on line 182 in src/kiota/Rpc/Server.cs

View workflow job for this annotation

GitHub Actions / Build

Use PascalCase for named placeholders. (https://rules.sonarsource.com/csharp/RSPEC-6678)
}
return logger.LogEntries;
}
public async Task<List<LogEntry>> GeneratePluginAsync(string openAPIFilePath, string outputPath, PluginType[] pluginTypes, string[] includePatterns, string[] excludePatterns, string clientClassName, bool cleanOutput, bool clearCache, string[] disabledValidationRules, CancellationToken cancellationToken)
public async Task<List<LogEntry>> GeneratePluginAsync(string openAPIFilePath, string outputPath, PluginType[] pluginTypes, string[] includePatterns, string[] excludePatterns, string clientClassName, bool cleanOutput, bool clearCache, string[] disabledValidationRules, ConsumerOperation operation, CancellationToken cancellationToken)
{
var globalLogger = new ForwardedLogger<KiotaBuilder>();
var configuration = Configuration.Generation;
Expand All @@ -194,7 +194,7 @@
configuration.ClientClassName = clientClassName;
configuration.CleanOutput = cleanOutput;
configuration.ClearCache = clearCache;
configuration.Operation = ConsumerOperation.Add; //TODO should be updated to edit in the edit scenario
configuration.Operation = operation;
if (disabledValidationRules is { Length: > 0 })
configuration.DisabledValidationRules = disabledValidationRules.ToHashSet(StringComparer.OrdinalIgnoreCase);
if (pluginTypes is { Length: > 0 })
Expand All @@ -217,7 +217,7 @@
}
catch (Exception ex)
{
globalLogger.LogCritical(ex, "error adding the client: {exceptionMessage}", ex.Message);

Check warning on line 220 in src/kiota/Rpc/Server.cs

View workflow job for this annotation

GitHub Actions / Build

Use PascalCase for named placeholders. (https://rules.sonarsource.com/csharp/RSPEC-6678)
}
return globalLogger.LogEntries;
}
Expand Down
24 changes: 24 additions & 0 deletions vscode/microsoft-kiota/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,27 @@ Where kiotaVersionInPackage is the kiotaVersion field and versionInPackage is th
> Note: the **.vscode** segment might change to **.vscode-server** if you're remoting to WSL.

> Note: alternatively to building executable yourself, you can download it from [the pipeline](https://github.com/microsoft/kiota/actions/workflows/dotnet.yml) by filtering the branch (top right corner) with the pull request branch, selecting the latest run, and downloading the right OS version from the artifacts. The only remaining work will be to move the downloaded files to the right path above.

#### Using the ready-made script

If you want to automate these steps, you can use the following script to automate the process:

```powershell
.\scripts\execute-vscode-sideload.ps1 -Platform "win-x64|linux-x64|osx-x64"
```

If you are using WSL, you can use the following:

```powershell
.\scripts\execute-vscode-sideload.ps1 -WSL
```

## FAQ

### VS Code keeps reinstalling from the marketplace

This is most likely caused by the fact that there's a newer released version. Run the following script replacing the version argument with the latest version of kiota.

```powershell
.\scripts\update-vscode-releases.ps1 -version "versionWithoutVPrefix" -online -filePath .\vscode\microsoft-kiota\package.json
```
36 changes: 34 additions & 2 deletions vscode/microsoft-kiota/l10n/bundle.l10n.ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"Generating client...": "انشاء العميل...",
"Loading...": "جاري التحميل...",
"Updating clients...": "تحديث العملاء...",
"Pick a lock file": "اختر ملف قفل",
"Open a lock file": "افتح ملف قفل",
"Filter the API description": "قم بتصفية وصف API",
"Enter a filter": "أدخل عامل التصفية",
Expand All @@ -38,5 +37,38 @@
"Invalid URL, please check the documentation for the supported URLs": "عنوان URL غير صالح ، يرجى التحقق من الوثائق الخاصة بعناوين URL المدعومة",
"No content found in the clipboard": "لم يتم العثور على محتوى في الحافظة",
"Invalid content found in the clipboard": "تم العثور على محتوى غير صالح في الحافظة",
"Select an API manifest key": "حدد مفتاح بيان واجهة برمجة التطبيقات"
"Select an API manifest key": "حدد مفتاح بيان واجهة برمجة التطبيقات",
"Edit Paths":"",
"Re-generate": "",
"Add an API description": "",
"Search or paste a path to an API description": "",
"Generate a plugin": "",
"Generate an API manifest": "",
"What do you want to generate?": "",
"Select an option": "",
"class": "",
"namespace": "",
"output directory": "",
"language": "",
"Create a new API client": "",
"Create a new plugin": "",
"Create a new manifest": "",
"plugin name:": "",
"Choose a name for the plugin": "",
"Choose a plugin type": "",
"manifest name": "",
"Choose a name for the manifest": "",
"Required": "",
"Open installation instructions for kiota?": "",
"Invalid generation type": "",
"Yes, override it": "",
"Before adding a new API description, consider that your changes and current selection will be lost.": "",
"Cancel": "",
"Do you want to remove this API description?": "",
"Please save the workspace.json file before re-generation.": "",
"OK": "",
"Generating manifest...": "",
"Generating plugin...": "",
"Re-generating client...": "",
"Re-generating plugin...": ""
}
36 changes: 34 additions & 2 deletions vscode/microsoft-kiota/l10n/bundle.l10n.cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"Generating client...": "Generování klienta...",
"Updating clients...": "Aktualizace klientů...",
"Loading...": "Načítání...",
"Pick a lock file": "Vybrat soubor zámku",
"Open a lock file": "Otevřít soubor zámku",
"Filter the API description": "Filtrovat popis API",
"Enter a filter": "Zadejte filtr",
Expand All @@ -38,5 +37,38 @@
"Invalid URL, please check the documentation for the supported URLs": "Neplatná URL adresa, zkontrolujte dokumentaci pro podporované URL adresy",
"No content found in the clipboard": "V schránce nebyl nalezen žádný obsah",
"Invalid content found in the clipboard": "V schránce byl nalezen neplatný obsah",
"Select an API manifest key": "Vyberte klíč manifestu API"
"Select an API manifest key": "Vyberte klíč manifestu API",
"Edit Paths":"Upravit cesty",
"Re-generate": "Znovu vygenerovat",
"Add an API description": "Přidat popis API",
"Search or paste a path to an API description": "Hledat nebo vložit cestu k popisu API",
"Generate a plugin": "Generovat plugin",
"Generate an API manifest": "Generovat API manifest",
"What do you want to generate?": "Co chcete generovat? ",
"Select an option": "Vyberte možnost",
"class": "třída",
"namespace": "jmenný prostor",
"output directory": "výstupní adresář",
"language": "jazyk",
"Create a new API client": "Vytvořit nového API klienta",
"Create a new plugin": "Vytvořit nový plugin",
"Create a new manifest": "Vytvořit nový manifest",
"plugin name:": "název pluginu",
"Choose a name for the plugin": "Vyberte název pro plugin",
"Choose a plugin type": "Vyberte typ pluginu",
"manifest name": "název manifestu",
"Choose a name for the manifest": "Vyberte název pro manifest",
"Required": "Požadováno",
"Open installation instructions for kiota?": "Otevřít instalační pokyny pro kiota",
"Invalid generation type": "Neplatný typ generování",
"Yes, override it": "Ano, přepsat",
"Before adding a new API description, consider that your changes and current selection will be lost.": "Před přidáním nového popisu API zvažte, že vaše změny a aktuální výběr budou ztraceny.",
"Cancel": "Zrušit",
"Do you want to remove this API description?": "Chcete odstranit tento popis API?",
"Please save the workspace.json file before re-generation.": "Před generováním prosím uložte soubor workspace.json",
"OK": "OK",
"Generating manifest...": "Generování manifestu...",
"Generating plugin...": "Generování pluginu...",
"Re-generating client...": "Opětovné generování klienta...",
"Re-generating plugin...": "Opětovné generování pluginu..."
}
36 changes: 34 additions & 2 deletions vscode/microsoft-kiota/l10n/bundle.l10n.es.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"Generating client...": "Generando cliente...",
"Updating clients...": "Actualizando clientes...",
"Loading...": "Cargando...",
"Pick a lock file": "Seleccionar un archivo lock",
"Open a lock file": "Abrir un archivo lock",
"Filter the API description": "Filtrar descripción de API",
"Enter a filter": "Ingresar un filtro",
Expand All @@ -38,5 +37,38 @@
"Invalid URL, please check the documentation for the supported URLs": "URL inválido, por favor revise la documentación de URL soportados.",
"No content found in the clipboard": "Sin contenido en el portapapeles.",
"Invalid content found in the clipboard": "Contenido inválido en el portapapeles.",
"Select an API manifest key": "Seleccione una llave de manifesto de API."
"Select an API manifest key": "Seleccione una llave de manifesto de API.",
"Edit Paths":"Editar ruta de acceso",
"Re-generate": "Re-generar",
"Add an API description": "Agregar una descripción de API",
"Search or paste a path to an API description": "Busca o pega una ruta a una descripcion de API",
"Generate a plugin": "Generar un plugin",
"Generate an API manifest": "Generar un manifesto de API",
"What do you want to generate?": "Qué quieres generar?",
"Select an option": "Seleccionar una opción",
"class": "clase",
"namespace": "namespace",
"output directory": "directorio de salida",
"language": "idioma",
"Create a new API client": "Crear un nuevo cliente de API",
"Create a new plugin": "Crear un nuevo plugin",
"Create a new manifest": "Crear un nuevo manifesto",
"plugin name:": "nombre del plugin",
"Choose a name for the plugin": "Elija un nombre para el plugin",
"Choose a plugin type": "Elija un tipo de plugin",
"manifest name": "Nombre de manifesto",
"Choose a name for the manifest": "Elija un nombre para el manifesto",
"Required": "Requerido",
"Open installation instructions for kiota?": "Abrir las instrucciones de instalación para Kiota",
"Invalid generation type": "Tipo de generación inválido",
"Yes, override it": "Sí, sobrescribir",
"Before adding a new API description, consider that your changes and current selection will be lost.": "Antes de agregar una nueva descripción de API, considere que sus cambios and selección actual se perderá",
"Cancel": "Cancelar",
"Do you want to remove this API description?": "Quieres quitar esta descripcion de API?",
"Please save the workspace.json file before re-generation.": "Por favor, guarde el archivo workspace.json antes de re-generar.",
"OK": "Ok",
"Generating manifest...": "Generando manifesto...",
"Generating plugin...": "Generando plugin...",
"Re-generating client...": "Re-generando cliente...",
"Re-generating plugin...": "Re-generando plugin..."
}
36 changes: 34 additions & 2 deletions vscode/microsoft-kiota/l10n/bundle.l10n.fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"Generating client...": "Génération du client...",
"Updating clients...": "Mise à jour des clients...",
"Loading...": "Chargement...",
"Pick a lock file": "Sélectionnez un fichier verrou",
"Open a lock file": "Ouvrir un fichier verrou",
"Filter the API description": "Filtrer la description d'API",
"Enter a filter": "Entrez un filtre",
Expand All @@ -38,5 +37,38 @@
"Invalid URL, please check the documentation for the supported URLs": "URL invalide, veuillez vérifier la documentation pour les URL prises en charge",
"No content found in the clipboard": "Aucun contenu trouvé dans le presse-papiers",
"Invalid content found in the clipboard": "Contenu non valide trouvé dans le presse-papiers",
"Select an API manifest key": "Sélectionnez une clé de manifeste d'API"
"Select an API manifest key": "Sélectionnez une clé de manifeste d'API",
"Edit Paths":"Modifier les chemins",
"Re-generate": "Générer de nouveau",
"Add an API description": "Ajouter une description d'API",
"Search or paste a path to an API description": "Rechercher ou coller un chemin vers unde description d'API",
"Generate a plugin": "Générer un plugin",
"Generate an API manifest": "Générer un manifeste d'API",
"What do you want to generate?": "Que souhaitez vous générer?",
"Select an option": "Sélectionnez une option",
"class": "classe",
"namespace": "espace de nommage",
"output directory": "répertoire de sortie",
"language": "langage",
"Create a new API client": "Créer un nouveau client d'API",
"Create a new plugin": "Créer un nouveau composant",
"Create a new manifest": "Créer un nouveau manifeste",
"plugin name:": "nom du composant",
"Choose a name for the plugin": "Choisissez un nom pour le composant",
"Choose a plugin type": "Choisisses un type de composant",
"manifest name": "nom du manifeste",
"Choose a name for the manifest": "Choisissez un nom pour le manifeste",
"Required": "Requis",
"Open installation instructions for kiota?": "Ouvrir les instructions d'installation pour kiota?",
"Invalid generation type": "Type de génération invalide",
"Yes, override it": "Oui, l'écraser",
"Before adding a new API description, consider that your changes and current selection will be lost.": "Avant d'ajouter une nouvelle description d'API veuillez noter que vos modifications et sélections actuelles seront perdues",
"Cancel": "Annuler",
"Do you want to remove this API description?": "Voulez-vous supprimer cette description d'API?",
"Please save the workspace.json file before re-generation.": "Veuillez sauvegarder le fichier workspace.json avant de générer à nouveau.",
"OK": "Ok",
"Generating manifest...": "Génération du manifeste...",
"Generating plugin...": "Génération du composant...",
"Re-generating client...": "Rafraichissement du client...",
"Re-generating plugin...": "Refraichissement du composant..."
}
Loading
Loading