Skip to content

Commit ecc9ba6

Browse files
Chris Martinezcommonsensesoftware
authored andcommitted
Add support to include API version parameters for version-neutral actions
1 parent ed47ae3 commit ecc9ba6

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/Common.ApiExplorer/ApiExplorerOptions.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,22 @@ public partial class ApiExplorerOptions
5353
/// <value>The default description for API version parameters. The default value
5454
/// is "The requested API version".</value>
5555
public string DefaultApiVersionParameterDescription { get; set; } = LocalSR.DefaultApiVersionParamDesc;
56+
57+
/// <summary>
58+
/// Gets or sets a value indicating whether API version parameters are added when an API is version-neutral.
59+
/// </summary>
60+
/// <value>True if API version parameters should be included when exploring a version-neutral API; otherwise, false.
61+
/// The default value is <c>false</c>.</value>
62+
/// <remarks>
63+
/// <para>
64+
/// A version-neutral API can accept any API version, including none at all. Setting this property to true
65+
/// will enable exploring parameter descriptors for an API version that can be used to generate user input, which
66+
/// may be useful for a version-neutral API that its own per-API version logic.
67+
/// </para>
68+
/// <para>
69+
/// An API version defined using the URLsegment method is unaffected by this setting because path-based route
70+
/// parameters are always required.
71+
/// </para></remarks>
72+
public bool AddApiVersionParametersWhenVersionNeutral { get; set; }
5673
}
5774
}

0 commit comments

Comments
 (0)