Skip to content

Commit

Permalink
Merge pull request #583 from christianhelle/kiota-v1.4.0
Browse files Browse the repository at this point in the history
Add support for Microsoft Kiota v1.4.0
  • Loading branch information
christianhelle committed Jul 12, 2023
2 parents bb1f714 + 6f6e925 commit ec9d012
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ A collection of Visual Studio C# custom tool code generators for Swagger / OpenA
The output file is the result of merging all the files generated using the OpenAPI Generator tool with:
` generate -g csharp --input-spec [swagger file] --output [output file] -DapiTests=false -DmodelTests=false -DpackageName=[default namespace] --skip-overwrite`

- ***KiotaCodeGenerator*** - Generates a single file C# REST API Client using the Microsoft project **[Kiota v1.3.0](https://microsoft.github.io/kiota)** generator.
- ***KiotaCodeGenerator*** - Generates a single file C# REST API Client using the Microsoft project **[Kiota v1.4.0](https://microsoft.github.io/kiota)** generator.
The output file is the result of merging all the files generated using the Kiota dotnet tool with:
` generate -l CSharp -d [swagger file] -o [output file] -n [default namespace]`

Expand Down Expand Up @@ -293,7 +293,7 @@ Options:
Commands:
autorest AutoRest (v3.0.0-beta.20210504.2)
kiota Microsoft project Kiota (v1.3.0)
kiota Microsoft project Kiota (v1.4.0)
nswag NSwag (v13.19.0)
openapi OpenAPI Generator (v6.6.0)
refitter Refitter (v0.6.2)
Expand Down
2 changes: 1 addition & 1 deletion docs/CLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Options:
Commands:
autorest AutoRest (v3.0.0-beta.20210504.2)
kiota Microsoft project Kiota (v1.3.0)
kiota Microsoft project Kiota (v1.4.0)
nswag NSwag (v13.19.0)
openapi OpenAPI Generator (v6.6.0)
refitter Refitter (v0.6.2)
Expand Down
2 changes: 1 addition & 1 deletion docs/Marketplace.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ A collection of Visual Studio C# custom tool code generators for Swagger / OpenA
The output file is the result of merging all the files generated using the OpenAPI Generator tool with:
` generate -g csharp --input-spec [swagger file] --output [output file] -DapiTests=false -DmodelTests=false -DpackageName=[default namespace] --skip-overwrite`

- ***KiotaCodeGenerator*** - Generates a single file C# REST API Client using the Microsoft project **[Kiota v1.3.0](https://microsoft.github.io/kiota)** generator.
- ***KiotaCodeGenerator*** - Generates a single file C# REST API Client using the Microsoft project **[Kiota v1.4.0](https://microsoft.github.io/kiota)** generator.
The output file is the result of merging all the files generated using the Kiota dotnet tool with:
` generate -l CSharp -d [swagger file] -o [output file] -n [default namespace]`

Expand Down
2 changes: 1 addition & 1 deletion docs/Marketplace2022.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ A collection of Visual Studio C# custom tool code generators for Swagger / OpenA
The output file is the result of merging all the files generated using the OpenAPI Generator tool with:
` generate -g csharp --input-spec [swagger file] --output [output file] -DapiTests=false -DmodelTests=false -DpackageName=[default namespace] --skip-overwrite`

- ***KiotaCodeGenerator*** - Generates a single file C# REST API Client using the Microsoft project **[Kiota v1.3.0](https://microsoft.github.io/kiota)** generator.
- ***KiotaCodeGenerator*** - Generates a single file C# REST API Client using the Microsoft project **[Kiota v1.4.0](https://microsoft.github.io/kiota)** generator.
The output file is the result of merging all the files generated using the Kiota dotnet tool with:
` generate -l CSharp -d [swagger file] -o [output file] -n [default namespace]`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Rapicgen.CLI.Commands.CSharp;

[Command("kiota", Description = "Microsoft project Kiota (v1.3.0)")]
[Command("kiota", Description = "Microsoft project Kiota (v1.4.0)")]
public class KiotaCommand : CodeGeneratorCommand
{
private readonly IProcessLauncher processLauncher;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public void InstallKiota_Invokes_ProcessLauncher(
.Verify(
c => c.Start(
It.IsAny<string>(),
"tool install --global Microsoft.OpenApi.Kiota --version 1.3.0",
"tool install --global Microsoft.OpenApi.Kiota --version 1.4.0",
null));
}

Expand All @@ -104,7 +104,7 @@ public void InstallKiota_Ignores_ProcessLauncherException_For_Already_Installed(
.Throws(
new ProcessLaunchException(
"dotnet",
"tool install --global Microsoft.OpenApi.Kiota --version 1.3.0",
"tool install --global Microsoft.OpenApi.Kiota --version 1.4.0",
null,
string.Empty,
"Tool 'microsoft.openapi.kiota' is already installed."));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ public string GenerateCode(IProgressReporter? pGenerateProgress)
var output = CSharpFileMerger.MergeFiles(outputFolder);

pGenerateProgress?.Progress(100);
return GeneratedCode.PrefixAutogeneratedCodeHeader(output, "Kiota", "v1.3.0");
return GeneratedCode.PrefixAutogeneratedCodeHeader(output, "Kiota", "v1.4.0");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void InstallKiota()
try
{
var command = PathProvider.GetDotNetPath();
const string arguments = "tool install --global Microsoft.OpenApi.Kiota --version 1.3.0";
const string arguments = "tool install --global Microsoft.OpenApi.Kiota --version 1.4.0";
using var context = new DependencyContext(command, $"{command} {arguments}");
processLauncher.Start(command, arguments);
context.Succeeded();
Expand Down
4 changes: 2 additions & 2 deletions src/VSIX/ApiClientCodeGen.VSIX.Dev17/VSCommandTable.vsct
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
</Button>
<Button guid="guidPackageCmdSet" id="KiotaCodeGeneratorCustomToolSetter" priority="0x0102" type="Button">
<Strings>
<ButtonText>Generate with Microsoft Kiota (v1.3.0)</ButtonText>
<ButtonText>Generate with Microsoft Kiota (v1.4.0)</ButtonText>
</Strings>
</Button>
<Button guid="guidPackageCmdSet" id="SwaggerCodeGeneratorCustomToolSetter" priority="0x0103" type="Button">
Expand Down Expand Up @@ -88,7 +88,7 @@
</Button>
<Button guid="guidNewRestApiClientCmdSet" id="GenerateWithKiota" priority="0x0103" type="Button">
<Strings>
<ButtonText>Generate with Microsoft Kiota (v1.3.0)</ButtonText>
<ButtonText>Generate with Microsoft Kiota (v1.4.0)</ButtonText>
</Strings>
</Button>
<Button guid="guidNewRestApiClientCmdSet" id="GenerateWithSwagger" priority="0x0104" type="Button">
Expand Down
4 changes: 2 additions & 2 deletions src/VSIX/ApiClientCodeGen.VSIX/VSCommandTable.vsct
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
</Button>
<Button guid="guidPackageCmdSet" id="KiotaCodeGeneratorCustomToolSetter" priority="0x0102" type="Button">
<Strings>
<ButtonText>Generate with Microsoft Kiota (v1.3.0)</ButtonText>
<ButtonText>Generate with Microsoft Kiota (v1.4.0)</ButtonText>
</Strings>
</Button>
<Button guid="guidPackageCmdSet" id="SwaggerCodeGeneratorCustomToolSetter" priority="0x0103" type="Button">
Expand Down Expand Up @@ -88,7 +88,7 @@
</Button>
<Button guid="guidNewRestApiClientCmdSet" id="GenerateWithKiota" priority="0x0103" type="Button">
<Strings>
<ButtonText>Generate with Microsoft Kiota (v1.3.0)</ButtonText>
<ButtonText>Generate with Microsoft Kiota (v1.4.0)</ButtonText>
</Strings>
</Button>
<Button guid="guidNewRestApiClientCmdSet" id="GenerateWithSwagger" priority="0x0104" type="Button">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
defaultHandler="ApiClientCodeGen.VSMac.Commands.Handlers.AddNewOpenApiCommandHandler" />

<Command id = "ApiClientCodeGen.VSMac.Commands.AddToProject.Kiota"
_label = "Generate with Kiota (v1.3.0)"
_label = "Generate with Kiota (v1.4.0)"
defaultHandler="ApiClientCodeGen.VSMac.Commands.Handlers.AddNewKiotaCommandHandler" />

<Command id = "ApiClientCodeGen.VSMac.Commands.AddToProject.Refitter"
Expand Down Expand Up @@ -68,7 +68,7 @@
defaultHandler="ApiClientCodeGen.VSMac.Commands.Handlers.GenerateOpenApiCommandHandler" />

<Command id = "ApiClientCodeGen.VSMac.Commands.GenerateCode.Kiota"
_label = "Generate with Kiota (v1.3.0)"
_label = "Generate with Kiota (v1.4.0)"
defaultHandler="ApiClientCodeGen.VSMac.Commands.Handlers.GenerateKiotaCommandHandler" />

<Command id = "ApiClientCodeGen.VSMac.Commands.GenerateCode.Refitter"
Expand Down

0 comments on commit ec9d012

Please sign in to comment.