Skip to content

3.1.7版本Swagger集成MiniProfiler功能Bug #195

Description

@xzh1995112

描述一下BUG

3.1.7版本的OSharp.Swagger中使用MiniProfiler后,Swagger主页会发生js异常,导致MiniProfiler插件无法使用

重现步骤

  1. 启动类: Startup.cs => 方法:ConfigureServices => 添加模块:MiniProfilerPack
  2. 打开 Swagger index.html
  3. 按F12 打开浏览器控制台
  4. 查看错误信息: Uncaught TypeError: Cannot read property 'toLowerCase' of undefined

期望行为

在OSharp.Swagger模块的index.html 页面id为mini-profiler的script标签里添加【data-scheme=""】这一属性即可解决MiniProfiler插件无法使用的问题

附加上下文,如截图

修复前

MiniProfiler插件不显示截图
image

控制台js报错截图
image

修复后

Swagger index.html页面
image

MiniProfiler插件正常显示截图
image

控制台截图(已无js报错信息)
image

运行环境

Desktop (please complete the following information):

  • Version 10
  • OS: Windows
  • Browser Chrome

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions