简体   繁体   English

Swagger UI 不显示 operationId

[英]Swagger UI does not display operationId

Our C# Asp.NET (not core) REST API uses the Swashbuckle nuget package (thanks Richard Morris) v5.6 to generate the swagger definition and UI page.我们的 C# Asp.NET(非核心)REST API 使用 Swashbuckle nuget 包(感谢 Richard Morris)v5.6 来生成 swagger 定义和 UI 页面。 The problem is, that the operationId is not displayed on the UI page.问题是,操作ID 未显示在 UI 页面上。

I can see on several pages that the .net core version contains a mystic DisplayOperationId=true configuration settings to (hopelessly) solve this issue.我可以在几个页面上看到 .net 核心版本包含一个神秘的DisplayOperationId=true配置设置来(无可救药地)解决这个问题。 But in the non .net core version I cannot find this settings, nor cannot see a working example how to customize the UI to display that piece of information.但是在非 .net 核心版本中,我找不到此设置,也看不到如何自定义 UI 以显示该信息的工作示例。

Could somebody help me how to solve this problem?有人可以帮我解决这个问题吗? Thanks in advance!提前致谢!

According to the docs... 根据文档...

displayOperationId DISPLAY_OPERATION_ID Boolean=false. displayOperationId DISPLAY_OPERATION_ID布尔值= false。 Controls the display of operationId in operations list. 控制操作列表中operationId的显示。 The default is false. 默认为false。

https://swagger.io/docs/open-source-tools/swagger-ui/usage/configuration/ https://swagger.io/docs/open-source-tools/swagger-ui/usage/configuration/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM