diff options
Diffstat (limited to 'MatrixRoomUtils.DebugDataValidationApi')
6 files changed, 0 insertions, 138 deletions
diff --git a/MatrixRoomUtils.DebugDataValidationApi/Controllers/ValidationController.cs b/MatrixRoomUtils.DebugDataValidationApi/Controllers/ValidationController.cs deleted file mode 100644 index 949871a..0000000 --- a/MatrixRoomUtils.DebugDataValidationApi/Controllers/ValidationController.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System.Text.Json; -using MatrixRoomUtils.Core.Extensions; -using Microsoft.AspNetCore.Mvc; - -namespace MatrixRoomUtils.DebugDataValidationApi.Controllers; - -[ApiController] -[Route("/")] -public class ValidationController : ControllerBase { - private readonly ILogger<ValidationController> _logger; - - public ValidationController(ILogger<ValidationController> logger) { - _logger = logger; - } - - [HttpPost("/validate/{type}")] - public async Task<bool> Get([FromRoute] string type, [FromBody] JsonElement content) { - Type t = Type.GetType(type); - if (t is null) { - Console.WriteLine($"Type `{type}` does not exist!"); - throw new ArgumentException($"Unknown type {type}!"); - } - Console.WriteLine($"Validating {type}..."); - return content.FindExtraJsonElementFields(t, "$"); - } -} diff --git a/MatrixRoomUtils.DebugDataValidationApi/MatrixRoomUtils.DebugDataValidationApi.csproj b/MatrixRoomUtils.DebugDataValidationApi/MatrixRoomUtils.DebugDataValidationApi.csproj deleted file mode 100644 index 4c23207..0000000 --- a/MatrixRoomUtils.DebugDataValidationApi/MatrixRoomUtils.DebugDataValidationApi.csproj +++ /dev/null @@ -1,19 +0,0 @@ -<Project Sdk="Microsoft.NET.Sdk.Web"> - - <PropertyGroup> - <TargetFramework>net7.0</TargetFramework> - <Nullable>enable</Nullable> - <ImplicitUsings>enable</ImplicitUsings> - <InvariantGlobalization>true</InvariantGlobalization> - </PropertyGroup> - - <ItemGroup> - <PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.9" /> - <PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" /> - </ItemGroup> - - <ItemGroup> - <ProjectReference Include="..\MatrixRoomUtils.Core\MatrixRoomUtils.Core.csproj" /> - </ItemGroup> - -</Project> diff --git a/MatrixRoomUtils.DebugDataValidationApi/Program.cs b/MatrixRoomUtils.DebugDataValidationApi/Program.cs deleted file mode 100644 index 047dbcf..0000000 --- a/MatrixRoomUtils.DebugDataValidationApi/Program.cs +++ /dev/null @@ -1,32 +0,0 @@ -var builder = WebApplication.CreateBuilder(args); - -// Add services to the container. - -builder.Services.AddControllers(); -// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle -builder.Services.AddEndpointsApiExplorer(); -builder.Services.AddSwaggerGen(); -builder.Services.AddCors(options => -{ - options.AddPolicy( - "Open", - builder => builder.AllowAnyOrigin().AllowAnyHeader()); -}); - -var app = builder.Build(); - -// Configure the HTTP request pipeline. -if (app.Environment.IsDevelopment()) { - app.UseSwagger(); - app.UseSwaggerUI(); -} - -// app.UseHttpsRedirection(); - -app.UseCors("Open"); - -app.UseAuthorization(); - -app.MapControllers(); - -app.Run(); diff --git a/MatrixRoomUtils.DebugDataValidationApi/Properties/launchSettings.json b/MatrixRoomUtils.DebugDataValidationApi/Properties/launchSettings.json deleted file mode 100644 index c33e091..0000000 --- a/MatrixRoomUtils.DebugDataValidationApi/Properties/launchSettings.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:63687", - "sslPort": 44316 - } - }, - "profiles": { - "http": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": false, - "launchUrl": "swagger", - "applicationUrl": "http://localhost:5116", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "https": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "launchUrl": "swagger", - "applicationUrl": "https://localhost:7017;http://localhost:5116", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "launchUrl": "swagger", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} diff --git a/MatrixRoomUtils.DebugDataValidationApi/appsettings.Development.json b/MatrixRoomUtils.DebugDataValidationApi/appsettings.Development.json deleted file mode 100644 index 12c8ab9..0000000 --- a/MatrixRoomUtils.DebugDataValidationApi/appsettings.Development.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Information", - "Microsoft.AspNetCore.Routing": "Warning", - "Microsoft.AspNetCore.Mvc": "Warning", - "Microsoft.AspNetCore.Cors": "Warning" - } - } -} diff --git a/MatrixRoomUtils.DebugDataValidationApi/appsettings.json b/MatrixRoomUtils.DebugDataValidationApi/appsettings.json deleted file mode 100644 index 10f68b8..0000000 --- a/MatrixRoomUtils.DebugDataValidationApi/appsettings.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning" - } - }, - "AllowedHosts": "*" -} |