コード例 #1
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "application/json; charset=utf-8";

            context.Response.Write(JsonConvertExd.SerializeObject(WebBaseUtil.ApiMethodMetaCache.Select(c => c.Value)));
        }
コード例 #2
0
 public override string CustomOutputFun(ApiRequestModelBase request, NormalResponseModel response)
 {
     return(JsonConvertExd.SerializeObject(WebBaseUtil.ApiMethodMetaCache.Where(x => x.Value.APIMethodDesc.IsShow).Select(c => c.Value)));
 }
コード例 #3
0
 public string OutPut <RequestModelType>(RequestModelType request)
 {
     return(JsonConvertExd.SerializeObject(request));
 }
コード例 #4
0
 public string OutPut <ResponseModel>(ResponseModel model)
 {
     return(JsonConvertExd.SerializeObject(model));
 }
コード例 #5
0
        public override string CustomOutputFun(ApiRequestModelBase request, NormalResponseModel response)
        {
            var message = new { message = "WelCome to OpenAPI!" };

            return(JsonConvertExd.SerializeObject(message));
        }