我希望默认选中范围Nswag

问题描述

这是Swagger / OpenAPI定义:

 services.AddOpenApiDocument(document =>
        {
            document.DocumentProcessors.Add(new SecurityDeFinitionAppender("Bearer",Enumerable.Empty<string>(),new OpenApiSecurityScheme
                {
                    Type = OpenApiSecuritySchemeType.OAuth2,Flow = OpenApiOAuth2Flow.AccessCode,Scopes = new Dictionary<string,string> {{"myScope","myScope"}},AuthorizationUrl = "redacted",TokenUrl = "redacted"
                }));
        }); 

和Swagger-UI配置选项:

app.UseSwaggerUi3(settings =>
        {
            settings.oauth2client = new oauth2clientSettings
            {
                ClientId = "MyClientID",ClientSecret = string.Empty,AppName = "My App",UsePkceWithAuthorizationCodeGrant = true
            };
        });

我希望认情况下应选中该范围,这可能吗?

enter image description here

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)