Import from internal git
This commit is contained in:
31
Core/Dto/ArgumentsDto.cs
Normal file
31
Core/Dto/ArgumentsDto.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using CommandLine;
|
||||
|
||||
namespace Core.Dto;
|
||||
|
||||
public class ArgumentsDto
|
||||
{
|
||||
|
||||
[Option('g', "gui", Required = false)]
|
||||
public bool Gui { get; set; }
|
||||
|
||||
[Option('n', "name", Required = false)]
|
||||
public string SpecName { get; set; } = null!;
|
||||
|
||||
[Option('a', "api-only", Required = false, Default = false)]
|
||||
public bool ApiOnly { get; set; }
|
||||
|
||||
[Option('m', "models-only", Required = false, Default = false)]
|
||||
public bool ModelsOnly { get; set; }
|
||||
|
||||
[Option('c', "client-only", Required = false, Default = false)]
|
||||
public bool ClientOnly { get; set; }
|
||||
|
||||
[Option('s', "safe-publish", Required = false, Default = false)]
|
||||
public bool SafePublish { get; set; }
|
||||
|
||||
[Option('f', "force-publish", Required = false, Default = false)]
|
||||
public bool ForcePublish { get; set; }
|
||||
|
||||
[Option('e', "export-puml", Required = false, Default = false)]
|
||||
public bool ExportPuml { get; set; }
|
||||
}
|
||||
25
Core/Dto/PackageDataDto.cs
Normal file
25
Core/Dto/PackageDataDto.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Core.Dto;
|
||||
|
||||
public class PackageDataDto
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public string Id;
|
||||
|
||||
[JsonProperty("repository")]
|
||||
public string Repository;
|
||||
|
||||
[JsonProperty("format")]
|
||||
public string Format;
|
||||
|
||||
[JsonProperty("group")]
|
||||
public string Group;
|
||||
|
||||
[JsonProperty("name")]
|
||||
public string Name;
|
||||
|
||||
[JsonProperty("version")]
|
||||
public string Version;
|
||||
|
||||
}
|
||||
14
Core/Dto/Settings/CredentialsConfigDto.cs
Normal file
14
Core/Dto/Settings/CredentialsConfigDto.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace Core.Dto.Settings;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// This class gathers all credentials-related configurations
|
||||
/// </summary>
|
||||
public class CredentialsConfigDto
|
||||
{
|
||||
public string Token { get; set; } = "";
|
||||
public string Email { get; set; } = "";
|
||||
public string Username { get; set; } = "";
|
||||
public string Password { get; set; } = "";
|
||||
public string AlwaysAuth { get; set; } = "";
|
||||
}
|
||||
11
Core/Dto/Settings/DefaultArgumentsConfigDto.cs
Normal file
11
Core/Dto/Settings/DefaultArgumentsConfigDto.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace Core.Dto.Settings;
|
||||
|
||||
/// <summary>
|
||||
/// This class gathers all default-related configurations
|
||||
/// </summary>
|
||||
public class DefaultArgumentsConfigDto
|
||||
{
|
||||
public string SpecIdentifier { get; set; } = "";
|
||||
|
||||
public string GeneratorVersion { get; set; } = "";
|
||||
}
|
||||
13
Core/Dto/Settings/DockerImagesConfigDto.cs
Normal file
13
Core/Dto/Settings/DockerImagesConfigDto.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace Core.Dto.Settings;
|
||||
|
||||
/// <summary>
|
||||
/// This class gathers docker images
|
||||
/// </summary>
|
||||
public class DockerImagesConfigDto
|
||||
{
|
||||
|
||||
public string JavascriptImage { get; set; } = "";
|
||||
public string OpenApiGeneratorImage { get; set; } = "";
|
||||
public string DotnetSdkImage { get; set; } = "";
|
||||
public string MavenImage { get; set; } = "";
|
||||
}
|
||||
8
Core/Dto/Settings/DotnetConfigDto.cs
Normal file
8
Core/Dto/Settings/DotnetConfigDto.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace Core.Dto.Settings;
|
||||
|
||||
public class DotnetConfigDto
|
||||
{
|
||||
public string ServerFolder { init; get; } = "";
|
||||
public string CommonFolder { init; get; } = "";
|
||||
public string ClientFolder { init; get; } = "";
|
||||
}
|
||||
12
Core/Dto/Settings/EnvironnementConfigDto.cs
Normal file
12
Core/Dto/Settings/EnvironnementConfigDto.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace Core.Dto.Settings;
|
||||
|
||||
/// <summary>
|
||||
/// This class gathers environment-related configuration
|
||||
/// </summary>
|
||||
public class EnvironmentConfigDto
|
||||
{
|
||||
public string Invite { get; set; } = "";
|
||||
public string LocalRoot { get; set; } = "";
|
||||
public string DockerRoot { get; set; } = "";
|
||||
|
||||
}
|
||||
7
Core/Dto/Settings/GeneralConfigDto.cs
Normal file
7
Core/Dto/Settings/GeneralConfigDto.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace Core.Dto.Settings;
|
||||
|
||||
public class GeneralConfigDto
|
||||
{
|
||||
public string ApiFolder { init; get; } = "";
|
||||
public string OutputFolder { init; get; } = "";
|
||||
}
|
||||
6
Core/Dto/Settings/JavaConfigDto.cs
Normal file
6
Core/Dto/Settings/JavaConfigDto.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
namespace Core.Dto.Settings;
|
||||
|
||||
public class JavaConfigDto
|
||||
{
|
||||
public string Folder { init; get; } = "";
|
||||
}
|
||||
8
Core/Dto/Settings/JavascriptConfigDto.cs
Normal file
8
Core/Dto/Settings/JavascriptConfigDto.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace Core.Dto.Settings;
|
||||
|
||||
public class JavascriptConfigDto
|
||||
{
|
||||
|
||||
public string Folder { init; get; } = "";
|
||||
|
||||
}
|
||||
15
Core/Dto/Settings/OpenApiConfigDto.cs
Normal file
15
Core/Dto/Settings/OpenApiConfigDto.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
namespace Core.Dto.Settings;
|
||||
|
||||
public class OpenApiConfigDto
|
||||
{
|
||||
public string OutputFolder { init; get; } = "";
|
||||
public string GeneratorConfigFile { init; get; } = "";
|
||||
public string GeneratorIgnoreFile { init; get; } = "";
|
||||
public string SpecExtension {init; get; } = "";
|
||||
public string SchemasIdentifier {init; get; } = "";
|
||||
public string ConfigExtension {init; get; } = "";
|
||||
public string ConfigIdentifier {init; get; } = "";
|
||||
|
||||
|
||||
|
||||
}
|
||||
11
Core/Dto/Settings/PublishConfigDto.cs
Normal file
11
Core/Dto/Settings/PublishConfigDto.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace Core.Dto.Settings;
|
||||
|
||||
/// <summary>
|
||||
/// This class gathers publish-related configurations
|
||||
/// </summary>
|
||||
public class PublishConfigDto
|
||||
{
|
||||
public string NpmRegistry { get; set; } = "";
|
||||
public string NugetRegistry { get; set; } = "";
|
||||
public string MavenRegistry { get; set; } = "";
|
||||
}
|
||||
12
Core/Dto/Settings/TemplatesConfigDto.cs
Normal file
12
Core/Dto/Settings/TemplatesConfigDto.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace Core.Dto.Settings;
|
||||
|
||||
public class TemplatesConfigDto
|
||||
{
|
||||
public string Folder { init; get; } = "";
|
||||
public string PlantUml { init; get; } = "";
|
||||
public string DotnetServerGeneratorConfig { init; get; } = "";
|
||||
public string DotnetClientGeneratorConfig { init; get; } = "";
|
||||
public string JavaGeneratorConfig { init; get; } = "";
|
||||
public string ServerIgnore { init; get; } = "";
|
||||
public string ClientIgnore { init; get; } = "";
|
||||
}
|
||||
19
Core/Dto/Yaml/OpenApiYamlDto.cs
Normal file
19
Core/Dto/Yaml/OpenApiYamlDto.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using YamlDotNet.Serialization;
|
||||
|
||||
namespace Core.Dto.Yaml;
|
||||
|
||||
public class OpenApiYamlDto
|
||||
{
|
||||
[YamlMember(Alias = "openapi")]
|
||||
public string? Openapi { get; set; }
|
||||
|
||||
[YamlMember(Alias = "info")]
|
||||
public IDictionary<string, object>? Info { get; set; }
|
||||
|
||||
[YamlMember(Alias = "tags")]
|
||||
public IList<object>? Tags { get; set; }
|
||||
|
||||
[YamlMember(Alias = "components")]
|
||||
public IDictionary<string, IDictionary<string, object>>? Components { get; set; }
|
||||
|
||||
}
|
||||
26
Core/Dto/Yaml/PackageConfigDto.cs
Normal file
26
Core/Dto/Yaml/PackageConfigDto.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Core.Dto.Yaml;
|
||||
|
||||
[JsonObject]
|
||||
public class PackageConfigDto
|
||||
{
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; } = "";
|
||||
|
||||
[JsonProperty("type")]
|
||||
public string Type { get; set; } = "";
|
||||
|
||||
[JsonProperty("dotnetPackage")]
|
||||
public string DotnetPackage { get; set; } = "";
|
||||
|
||||
[JsonProperty("javascriptPackage")]
|
||||
public string JavascriptPackage { get; set; } = "";
|
||||
|
||||
[JsonProperty("keepModels")]
|
||||
public bool KeepModels { get; set; }
|
||||
|
||||
[JsonProperty("priority")]
|
||||
public int Priority { get; set; }
|
||||
|
||||
}
|
||||
19
Core/Dto/Yaml/SpecConfigDto.cs
Normal file
19
Core/Dto/Yaml/SpecConfigDto.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Core.Dto.Yaml;
|
||||
|
||||
public class SpecConfigDto
|
||||
{
|
||||
|
||||
[JsonProperty("packageTypes")]
|
||||
public Dictionary<string, List<string>> PackageTypes { get; set; } = [];
|
||||
|
||||
[JsonProperty("javaGroup")]
|
||||
public string JavaGroup { get; set; } = "";
|
||||
|
||||
[JsonProperty("modelSuffix")]
|
||||
public string ModelSuffix { get; set; } = "";
|
||||
|
||||
[JsonProperty("packages")]
|
||||
public List<PackageConfigDto> Packages { get; set; } = [];
|
||||
}
|
||||
Reference in New Issue
Block a user