| | | 1 | | namespace ProjectTemplate.Web.Options; |
| | | 2 | | |
| | | 3 | | /// <summary> |
| | | 4 | | /// Represents template-level API versioning configuration. |
| | | 5 | | /// </summary> |
| | | 6 | | public sealed class ApplicationApiVersioningOptions |
| | | 7 | | { |
| | | 8 | | /// <summary> |
| | | 9 | | /// Configuration section name for API versioning settings. |
| | | 10 | | /// </summary> |
| | | 11 | | public const string SectionName = "ProjectTemplate:ApiVersioning"; |
| | | 12 | | |
| | | 13 | | /// <summary> |
| | | 14 | | /// Gets or sets the default major API version. |
| | | 15 | | /// </summary> |
| | 1020 | 16 | | public int DefaultMajorVersion { get; set; } = 1; |
| | | 17 | | |
| | | 18 | | /// <summary> |
| | | 19 | | /// Gets or sets the default minor API version. |
| | | 20 | | /// </summary> |
| | 726 | 21 | | public int DefaultMinorVersion { get; set; } |
| | | 22 | | |
| | | 23 | | /// <summary> |
| | | 24 | | /// Gets or sets a value indicating whether an unspecified API version should use the default version. |
| | | 25 | | /// </summary> |
| | 742 | 26 | | public bool AssumeDefaultVersionWhenUnspecified { get; set; } = true; |
| | | 27 | | |
| | | 28 | | /// <summary> |
| | | 29 | | /// Gets or sets a value indicating whether supported and deprecated API versions should be reported in response hea |
| | | 30 | | /// </summary> |
| | 742 | 31 | | public bool ReportApiVersions { get; set; } = true; |
| | | 32 | | |
| | | 33 | | /// <summary> |
| | | 34 | | /// Gets or sets a value indicating whether URL segment versioning is enabled. |
| | | 35 | | /// </summary> |
| | 1028 | 36 | | public bool EnableUrlSegmentVersioning { get; set; } = true; |
| | | 37 | | |
| | | 38 | | /// <summary> |
| | | 39 | | /// Gets or sets a value indicating whether header-based versioning is enabled. |
| | | 40 | | /// </summary> |
| | 1032 | 41 | | public bool EnableHeaderVersioning { get; set; } = true; |
| | | 42 | | |
| | | 43 | | /// <summary> |
| | | 44 | | /// Gets or sets the request header name used for header-based API versioning. |
| | | 45 | | /// </summary> |
| | 1022 | 46 | | public string HeaderName { get; set; } = "X-API-Version"; |
| | | 47 | | } |