-
Notifications
You must be signed in to change notification settings - Fork 9.8k
/
ApiExplorerModel.cs
44 lines (38 loc) · 1.46 KB
/
ApiExplorerModel.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
namespace Microsoft.AspNetCore.Mvc.ApplicationModels;
/// <summary>
/// A model for ApiExplorer properties associated with a controller or action.
/// </summary>
public class ApiExplorerModel
{
/// <summary>
/// Creates a new <see cref="ApiExplorerModel"/>.
/// </summary>
public ApiExplorerModel()
{
}
/// <summary>
/// Creates a new <see cref="ApiExplorerModel"/> with properties copied from <paramref name="other"/>.
/// </summary>
/// <param name="other">The <see cref="ApiExplorerModel"/> to copy.</param>
public ApiExplorerModel(ApiExplorerModel other)
{
ArgumentNullException.ThrowIfNull(other);
GroupName = other.GroupName;
IsVisible = other.IsVisible;
}
/// <summary>
/// If <c>true</c>, <c>APIExplorer.ApiDescription</c> objects will be created for the associated
/// controller or action.
/// </summary>
/// <remarks>
/// Set this value to configure whether or not the associated controller or action will appear in ApiExplorer.
/// </remarks>
public bool? IsVisible { get; set; }
/// <summary>
/// The value for <c>APIExplorer.ApiDescription.GroupName</c> of
/// <c>APIExplorer.ApiDescription</c> objects created for the associated controller or action.
/// </summary>
public string? GroupName { get; set; }
}