diff --git a/src/Joba.IBM.RPA.Cli/Client/RpaClient.cs b/src/Joba.IBM.RPA.Cli/Client/RpaClient.cs index 9fb9794..b3c29b0 100644 --- a/src/Joba.IBM.RPA.Cli/Client/RpaClient.cs +++ b/src/Joba.IBM.RPA.Cli/Client/RpaClient.cs @@ -139,7 +139,7 @@ public async Task GetContentAsync(Guid scriptVersionId, CancellationToke return await client.GetStringAsync(url, cancellation); } } - + class AccountResource : IAccountResource { private readonly HttpClient client; diff --git a/src/Joba.IBM.RPA/UniqueId.cs b/src/Joba.IBM.RPA/UniqueId.cs index 17b16b2..1bac494 100644 --- a/src/Joba.IBM.RPA/UniqueId.cs +++ b/src/Joba.IBM.RPA/UniqueId.cs @@ -1,17 +1,17 @@ namespace Joba.IBM.RPA { /// - /// Must only contain latin letters (a-z, A-Z), numbers (0-9), underscores ( _ ) and cannot start with a number. + /// Must only contain lowercase latin letters (a-z), numbers (0-9), underscores ( _ ) and cannot start with a number. /// - public struct UniqueId + public readonly struct UniqueId { private readonly string uniqueId; public UniqueId(string name) { Original = name; - //TODO: use regex to replace everything except the allowed values. - uniqueId = name.Replace(" ", "_").Replace("-", "_"); + //TODO: use regex to replace everything except the allowed values: @"^[a-z_]([a-z0-9_]+)?$" + uniqueId = name.ToLower().Replace(" ", "_").Replace("-", "_"); } public string Original { get; }