public ActionResult <CycleCountResponse> CountCycles([FromQuery] string input) { var validationResult = Validator.Validate(input); if (!validationResult.ValidationResult.IsValid) { return(BadRequest(validationResult.ValidationResult.Messages)); } var memoryBanks = NumberHelper.Flatten(validationResult.Input); var response = new CycleCountResponse() { Result = Distributor.CountCycles(memoryBanks), Input = input, InputList = memoryBanks }; return(Ok(response)); }