Skip to content

Commit

Permalink
remove obsolete stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Rico Suter committed Sep 28, 2023
1 parent 06f635a commit a432103
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,9 @@
namespace NSwag.Commands.CodeGeneration
{
[Command(Name = "openapi2csclient", Description = "Generates CSharp client code from a Swagger/OpenAPI specification.")]
public class OpenApiToCSharpClientCommand : SwaggerToCSharpClientCommand
public class OpenApiToCSharpClientCommand : OpenApiToCSharpCommandBase<CSharpClientGeneratorSettings>
{
}

[Command(Name = "swagger2csclient", Description = "Generates CSharp client code from a Swagger/OpenAPI specification (obsolete: use openapi2csclient instead).")]
[Obsolete("Use openapi2csclient instead.")]
public class SwaggerToCSharpClientCommand : OpenApiToCSharpCommandBase<CSharpClientGeneratorSettings>
{
public SwaggerToCSharpClientCommand() : base(new CSharpClientGeneratorSettings())
public OpenApiToCSharpClientCommand() : base(new CSharpClientGeneratorSettings())
{
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,9 @@
namespace NSwag.Commands.CodeGeneration
{
[Command(Name = "openapi2cscontroller", Description = "Generates CSharp Web API controller code from a Swagger/OpenAPI specification.")]
public class OpenApiToCSharpControllerCommand : SwaggerToCSharpControllerCommand
public class OpenApiToCSharpControllerCommand : OpenApiToCSharpCommandBase<CSharpControllerGeneratorSettings>
{
}

[Command(Name = "swagger2cscontroller", Description = "Generates CSharp Web API controller code from a Swagger/OpenAPI specification (obsolete: use openapi2cscontroller instead).")]
[Obsolete("Use openapi2cscontroller instead.")]
public class SwaggerToCSharpControllerCommand : OpenApiToCSharpCommandBase<CSharpControllerGeneratorSettings>
{
public SwaggerToCSharpControllerCommand() : base(new CSharpControllerGeneratorSettings())
public OpenApiToCSharpControllerCommand() : base(new CSharpControllerGeneratorSettings())
{
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,9 @@
namespace NSwag.Commands.CodeGeneration
{
[Command(Name = "openapi2tsclient", Description = "Generates TypeScript client code from a Swagger/OpenAPI specification.")]
public class OpenApiToTypeScriptClientCommand : SwaggerToTypeScriptClientCommand
public class OpenApiToTypeScriptClientCommand : CodeGeneratorCommandBase<TypeScriptClientGeneratorSettings>
{
}

[Command(Name = "swagger2tsclient", Description = "Generates TypeScript client code from a Swagger/OpenAPI specification (obsolete: use openapi2tsclient instead).")]
[Obsolete("Use openapi2tsclient instead.")]
public class SwaggerToTypeScriptClientCommand : CodeGeneratorCommandBase<TypeScriptClientGeneratorSettings>
{
public SwaggerToTypeScriptClientCommand()
public OpenApiToTypeScriptClientCommand()
: base(new TypeScriptClientGeneratorSettings())
{
}
Expand Down
2 changes: 1 addition & 1 deletion src/NSwag.Commands/NSwagCommandProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public async Task<int> ProcessAsync(string[] args)
{
var processor = new CommandLineProcessor(_host);

processor.RegisterCommandsFromAssembly(typeof(SwaggerToCSharpControllerCommand).GetTypeInfo().Assembly);
processor.RegisterCommandsFromAssembly(typeof(OpenApiToCSharpControllerCommand).GetTypeInfo().Assembly);

var stopwatch = new Stopwatch();
stopwatch.Start();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ namespace NSwagStudio.ViewModels.CodeGenerators
public class SwaggerToCSharpClientGeneratorViewModel : ViewModelBase
{
private string _clientCode;
private SwaggerToCSharpClientCommand _command = new SwaggerToCSharpClientCommand();
private OpenApiToCSharpClientCommand _command = new OpenApiToCSharpClientCommand();

/// <summary>Gets the settings.</summary>
public SwaggerToCSharpClientCommand Command
public OpenApiToCSharpClientCommand Command
{
get { return _command; }
set
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ namespace NSwagStudio.ViewModels.CodeGenerators
public class SwaggerToCSharpControllerGeneratorViewModel : ViewModelBase
{
private string _clientCode;
private SwaggerToCSharpControllerCommand _command = new SwaggerToCSharpControllerCommand();
private OpenApiToCSharpControllerCommand _command = new OpenApiToCSharpControllerCommand();

/// <summary>Gets the settings.</summary>
public SwaggerToCSharpControllerCommand Command
public OpenApiToCSharpControllerCommand Command
{
get { return _command; }
set
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ namespace NSwagStudio.ViewModels.CodeGenerators
public class SwaggerToTypeScriptClientGeneratorViewModel : ViewModelBase
{
private string _clientCode;
private SwaggerToTypeScriptClientCommand _command = new SwaggerToTypeScriptClientCommand();
private OpenApiToTypeScriptClientCommand _command = new OpenApiToTypeScriptClientCommand();

/// <summary>Gets the settings.</summary>
public SwaggerToTypeScriptClientCommand Command
public OpenApiToTypeScriptClientCommand Command
{
get { return _command; }
set
Expand Down

0 comments on commit a432103

Please sign in to comment.