public async Task <ApiResult <bool> > ClientPackage([FromBody] GenerateClientModel value)
        {
            if (!ModelState.IsValid)
            {
                return(new ApiResult <bool>(l, BasicControllerCodes.UnprocessableEntity,
                                            ModelErrors()));
            }

            if (!await exists(value.id))
            {
                return(new ApiResult <bool>(l, BasicControllerCodes.NotFound));
            }

            var clients = new Dictionary <string, SwaggerCodeGenResult>();

            foreach (var v in value.languages)
            {
                var genResult = await swagerCodeGen.ClientGenerate(v.Key, v.Value);

                if (!clients.ContainsKey(v.Key))
                {
                    clients.Add(v.Key, genResult);
                }

                var ClientsSDKKey = $"ApiResource:ClientsSDK:{value.id}:{v.Key}";

                var cacheResult = await redis.Set(ClientsSDKKey, JsonConvert.SerializeObject(clients), null);
            }

            return(new ApiResult <bool>(true));
        }
        public async Task <ApiResult <GenerateClientModel> > ChannelsPackageList(int id)
        {
            if (!await exists(id))
            {
                return(new ApiResult <GenerateClientModel>(l, BasicControllerCodes.NotFound));
            }

            GenerateClientModel result = null;

            var ClientsSDKKey = $"ApiResource:ClientsSDK:{id}";

            var resultCache = await redis.Get(ClientsSDKKey);

            if (!string.IsNullOrWhiteSpace(resultCache))
            {
                result = JsonConvert.DeserializeObject <GenerateClientModel>(resultCache);
            }

            return(new ApiResult <GenerateClientModel>(result));
        }