如果true這樣,則不會ApiDescription為相關聯的控制器或動作建立任何物件。 C# publicboolIgnoreApi {get;set; } 屬性值 Boolean 適用於 產品版本 ASP.NET Core1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0 意見反應 此頁面對您有幫助嗎? YesNo 本文內容 定義 適用於...
public bool IgnoreApi { get; set; } Property ValueType: System.Boolean true if the controller or action should be ignored; otherwise, false.See AlsoReferenceApiExplorerSettingsAttribute ClassSystem.Web.Http.Description NamespaceEnglish (United States) Your Privacy Choices Theme Manage cookies Previous...
public bool IgnoreApi { [CompilerGeneratedAttribute] get; [CompilerGeneratedAttribute] set; } Property Value Type: System.Boolean true if the controller or action should be ignored; otherwise, false. See Also ApiExplorerSettingsAttribute Class System.Web.Http.Description Namespace Return ...
services.AddODataApiExplorer(options=>options.UseApiExplorerSettings=true); This is also documented in the wiki topicUse API Explorer Settings. Note that once you choose to honor theApiExplorerSettingsAttribute.IgnoreApi, this will result in all other undecorated classes that inherit fromODataController...
if(ignoreApiExplorerSettings) { returntrue; } returnaction.GetProperty<ApiExplorerModel>()?.IsODataVisible()?? action.GetProperty<ControllerModel>()?.ApiExplorer?.IsODataVisible()?? false; } /// /// Populates the API version parameters for the specified API description. /// Expand...
编辑:我知道通常属性是用来做什么的,但这个问题是关于这个特定属性的。对于造成的困惑,我表示歉意!我阅读了以下问题,以及指向如何使用该属性来忽略特定方法或整个控制器生成的 swagger/swash...What does the attribute "[ApiExplorerSettings(IgnoreApi = true)]" do?
[ApiExplorerSettings(IgnoreApi = true)] //隐藏该Action方法 public IEnumerable<string> Get() 为体验版本控制在新建一个控制器并添加 [ApiVersion("2.0")] 此时访问页面,在右侧的下拉框中可选择不同的版本,会展示不同版本下的控制器。 才疏学浅,相关文档等仅供自我总结,如有相关问题可留言交流谢谢。
ApiExplorerSettingsAttribute Initializes a new instance of the ApiExplorerSettingsAttribute class. Top Properties 展開資料表 NameDescription IgnoreApi Gets or sets a value indicating whether to exclude the controller or action from the ApiDescription instances generated by ApiExplorer. TypeId (Inherited ...
publicboolIgnoreApi {get;set; } Property Value Boolean Applies to ProductVersions ASP.NET Core1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0 Feedback Was this page helpful? YesNo In this article Definition Applies to...
publicboolIgnoreApi { [CompilerGeneratedAttribute]get; [CompilerGeneratedAttribute]set; } Property Value Type:System.Boolean true if the controller or action should be ignored; otherwise, false. See Also ApiExplorerSettingsAttribute Class System.Web.Http.Description Namespace ...