You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.3 KiB

namespace CoreAgent.Infrastructure.Options
{
public class ApiVersioningSettings
{
/// <summary>
/// 默认 API 版本
/// </summary>
public string DefaultVersion { get; set; } = "1.0";
/// <summary>
/// 是否在响应头中显示版本信息
/// </summary>
public bool ShowVersionInHeader { get; set; } = true;
/// <summary>
/// 是否在响应中显示版本信息
/// </summary>
public bool ShowVersionInResponse { get; set; } = true;
/// <summary>
/// 是否在 URL 中显示版本信息
/// </summary>
public bool ShowVersionInUrl { get; set; } = true;
/// <summary>
/// 是否在查询字符串中显示版本信息
/// </summary>
public bool ShowVersionInQueryString { get; set; } = true;
/// <summary>
/// 是否在媒体类型中显示版本信息
/// </summary>
public bool ShowVersionInMediaType { get; set; } = true;
/// <summary>
/// 是否报告 API 版本
/// </summary>
public bool ReportApiVersions { get; set; } = true;
/// <summary>
/// 是否假设默认版本
/// </summary>
public bool AssumeDefaultVersionWhenUnspecified { get; set; } = true;
}
}