about summary refs log tree commit diff
path: root/LibMatrix.DebugDataValidationApi/Controllers
diff options
context:
space:
mode:
Diffstat (limited to 'LibMatrix.DebugDataValidationApi/Controllers')
-rw-r--r--LibMatrix.DebugDataValidationApi/Controllers/ValidationController.cs26
1 files changed, 0 insertions, 26 deletions
diff --git a/LibMatrix.DebugDataValidationApi/Controllers/ValidationController.cs b/LibMatrix.DebugDataValidationApi/Controllers/ValidationController.cs
deleted file mode 100644
index 4dbee54..0000000
--- a/LibMatrix.DebugDataValidationApi/Controllers/ValidationController.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-using System.Text.Json;
-using LibMatrix.Extensions;
-using Microsoft.AspNetCore.Mvc;
-
-namespace LibMatrix.DebugDataValidationApi.Controllers;
-
-[ApiController]
-[Route("/")]
-public class ValidationController : ControllerBase {
-    private readonly ILogger<ValidationController> _logger;
-
-    public ValidationController(ILogger<ValidationController> logger) {
-        _logger = logger;
-    }
-
-    [HttpPost("/validate/{type}")]
-    public Task<bool> Get([FromRoute] string type, [FromBody] JsonElement content) {
-        var 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 Task.FromResult(content.FindExtraJsonElementFields(t, "$"));
-    }
-}