public void ProcessRequest(HttpContext context) { context.Response.ContentType = "application/json; charset=utf-8"; context.Response.Write(JsonConvertExd.SerializeObject(WebBaseUtil.ApiMethodMetaCache.Select(c => c.Value))); }
public override string CustomOutputFun(ApiRequestModelBase request, NormalResponseModel response) { return(JsonConvertExd.SerializeObject(WebBaseUtil.ApiMethodMetaCache.Where(x => x.Value.APIMethodDesc.IsShow).Select(c => c.Value))); }
public string OutPut <RequestModelType>(RequestModelType request) { return(JsonConvertExd.SerializeObject(request)); }
public string OutPut <ResponseModel>(ResponseModel model) { return(JsonConvertExd.SerializeObject(model)); }
public override string CustomOutputFun(ApiRequestModelBase request, NormalResponseModel response) { var message = new { message = "WelCome to OpenAPI!" }; return(JsonConvertExd.SerializeObject(message)); }