Import from internal git

This commit is contained in:
2025-10-11 13:08:09 +02:00
commit 97aaa715dc
175 changed files with 7014 additions and 0 deletions

31
Core/Dto/ArgumentsDto.cs Normal file
View 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; }
}

View 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;
}

View 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; } = "";
}

View 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; } = "";
}

View 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; } = "";
}

View 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; } = "";
}

View 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; } = "";
}

View File

@@ -0,0 +1,7 @@
namespace Core.Dto.Settings;
public class GeneralConfigDto
{
public string ApiFolder { init; get; } = "";
public string OutputFolder { init; get; } = "";
}

View File

@@ -0,0 +1,6 @@
namespace Core.Dto.Settings;
public class JavaConfigDto
{
public string Folder { init; get; } = "";
}

View File

@@ -0,0 +1,8 @@
namespace Core.Dto.Settings;
public class JavascriptConfigDto
{
public string Folder { init; get; } = "";
}

View 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; } = "";
}

View 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; } = "";
}

View 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; } = "";
}

View 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; }
}

View 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; }
}

View 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; } = [];
}