fix(wxapi): 修复部分接口模型定义问题

This commit is contained in:
Fu Diwei 2021-05-30 23:11:22 +08:00
parent 9f17974834
commit fcd9609bd0
16 changed files with 22 additions and 22 deletions

View File

@ -13,6 +13,6 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("code")]
[System.Text.Json.Serialization.JsonPropertyName("code")]
public string CardCode { get; set; } = string.Empty;
public string CardCode { get; set; } = default!;
}
}

View File

@ -13,6 +13,6 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("page_id")]
[System.Text.Json.Serialization.JsonPropertyName("page_id")]
public string PageId { get; set; } = default!;
public string PageId { get; set; } = string.Empty;
}
}

View File

@ -24,7 +24,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("title")]
[System.Text.Json.Serialization.JsonPropertyName("title")]
public string Title { get; set; } = string.Empty;
public string Title { get; set; } = default!;
/// <summary>
/// 获取或设置不含税金额(单位:分)。

View File

@ -55,6 +55,6 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("action_msg")]
[System.Text.Json.Serialization.JsonPropertyName("action_msg")]
public string ActionMessage { get; set; } = default!;
public string ActionMessage { get; set; } = string.Empty;
}
}

View File

@ -41,6 +41,6 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("action_msg")]
[System.Text.Json.Serialization.JsonPropertyName("action_msg")]
public string ActionMessage { get; set; } = default!;
public string ActionMessage { get; set; } = string.Empty;
}
}

View File

@ -18,14 +18,14 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("key")]
[System.Text.Json.Serialization.JsonPropertyName("key")]
public string Key { get; set; } = default!;
public string Key { get; set; } = string.Empty;
/// <summary>
/// 获取或设置运单信息 Value。
/// </summary>
[Newtonsoft.Json.JsonProperty("value")]
[System.Text.Json.Serialization.JsonPropertyName("value")]
public string Value { get; set; } = default!;
public string Value { get; set; } = string.Empty;
}
public class CustomData
@ -143,7 +143,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
}
}
public static class Converters
internal static class Converters
{
internal class NewtonsoftJsonWaybillDataListConverter : Newtonsoft.Json.JsonConverter<IList<Types.WaybillData>?>
{

View File

@ -17,7 +17,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("values")]
[System.Text.Json.Serialization.JsonPropertyName("values")]
public IList<string> Values { get; set; } = new List<string>();
public string[] Values { get; set; } = default!;
/// <summary>
/// 获取或设置更新时间戳。
@ -34,7 +34,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("content")]
[System.Text.Json.Serialization.JsonPropertyName("content")]
public string Content { get; set; } = string.Empty;
public string Content { get; set; } = default!;
/// <summary>
/// 获取或设置更新时间戳。

View File

@ -70,7 +70,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("sub_button")]
[System.Text.Json.Serialization.JsonPropertyName("sub_button")]
public IList<Button>? SubButtonList { get; set; }
public Button[]? SubButtonList { get; set; }
}
}

View File

@ -13,7 +13,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("path")]
[System.Text.Json.Serialization.JsonPropertyName("path")]
public string Path { get; set; } = default!;
public string Path { get; set; } = string.Empty;
/// <summary>
/// 获取或设置二维码的宽度(单位:像素)。

View File

@ -17,14 +17,14 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("dimension")]
[System.Text.Json.Serialization.JsonPropertyName("dimension")]
public string Dimension { get; set; } = default!;
public string Dimension { get; set; } = string.Empty;
/// <summary>
/// 获取或设置维度的取值。
/// </summary>
[Newtonsoft.Json.JsonProperty("value")]
[System.Text.Json.Serialization.JsonPropertyName("value")]
public string Value { get; set; } = default!;
public string Value { get; set; } = string.Empty;
}
}
@ -33,7 +33,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("metric")]
[System.Text.Json.Serialization.JsonPropertyName("metric")]
public string Metric { get; set; } = default!;
public string Metric { get; set; } = string.Empty;
/// <summary>
/// 获取或设置时间粒度。

View File

@ -16,7 +16,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
public string? AppId { get; set; }
/// <summary>
/// 获取或设置回调通知 URL
/// 获取或设置回调通知地址
/// </summary>
[Newtonsoft.Json.JsonProperty("url")]
[System.Text.Json.Serialization.JsonPropertyName("url")]

View File

@ -34,7 +34,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
public string? CarType { get; set; }
/// <summary>
/// 获取或设置回调通知 URL
/// 获取或设置回调通知地址
/// </summary>
[Newtonsoft.Json.JsonProperty("notify_url")]
[System.Text.Json.Serialization.JsonPropertyName("notify_url")]

View File

@ -20,13 +20,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("username")]
[System.Text.Json.Serialization.JsonPropertyName("username")]
public string Username { get; set; } = default!;
public string Username { get; set; } = string.Empty;
/// <summary>
/// 获取或设置用户昵称。
/// </summary>
[Newtonsoft.Json.JsonProperty("nickname")]
[System.Text.Json.Serialization.JsonPropertyName("nickname")]
public string Nickname { get; set; } = default!;
public string Nickname { get; set; } = string.Empty;
}
}

View File

@ -20,6 +20,6 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("username")]
[System.Text.Json.Serialization.JsonPropertyName("username")]
public string Username { get; set; } = default!;
public string Username { get; set; } = string.Empty;
}
}

View File

@ -48,7 +48,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
}
}
public static class Converters
internal static class Converters
{
internal class NewtonsoftJsonDefaultTimeDataConverter : Newtonsoft.Json.JsonConverter<Types.DefaultTimeData?>
{

View File

@ -149,7 +149,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("feeds_img")]
[System.Text.Json.Serialization.JsonPropertyName("feeds_img")]
public string FeedsImageUrl { get; set; } = string.Empty;
public string FeedsImageUrl { get; set; } = default!;
/// <summary>
/// 获取或设置是否开启官方收录。