fix(inbound-api): resolve InboundAPI-012 — move ParameterDefinition POCO to ScadaLink.Commons (Types/InboundApi)

This commit is contained in:
Joseph Doherty
2026-05-17 00:04:56 -04:00
parent 34588ae10c
commit 8dd74121c3
3 changed files with 39 additions and 24 deletions

View File

@@ -0,0 +1,15 @@
namespace ScadaLink.Commons.Types.InboundApi;
/// <summary>
/// Defines a single parameter in an inbound API method's parameter definitions.
/// This is the deserialized, persistence-ignorant form of the JSON stored in
/// <c>ApiMethod.ParameterDefinitions</c> and describes the public API contract,
/// so it is shared by every component that reads or produces method parameter
/// definitions (Inbound API, Central UI method editor, CLI, Management Service).
/// </summary>
public class ParameterDefinition
{
public string Name { get; set; } = string.Empty;
public string Type { get; set; } = "String";
public bool Required { get; set; } = true;
}

View File

@@ -1,4 +1,5 @@
using System.Text.Json;
using ScadaLink.Commons.Types.InboundApi;
namespace ScadaLink.InboundAPI;
@@ -142,16 +143,6 @@ public static class ParameterValidator
}
}
/// <summary>
/// Defines a parameter in a method's parameter definitions.
/// </summary>
public class ParameterDefinition
{
public string Name { get; set; } = string.Empty;
public string Type { get; set; } = "String";
public bool Required { get; set; } = true;
}
/// <summary>
/// Result of parameter validation.
/// </summary>