小编Hen*_*des的帖子

为什么 swagger 在 .NET 6 中打不开?

嗯,我正在做一个 DDD 项目,特别是使用 redis,但我认为这与它没有任何关系。

问题是,大摇大摆对我来说没有出现,它失败了,但是当我在邮递员中发出请求时它正常工作。

这就是错误:

 Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1]
  An unhandled exception has occurred while executing the request.
  System.TypeLoadException: Could not load type 'Microsoft.AspNetCore.Http.Metadata.ITagsMetadata' from assembly 'Microsoft.AspNetCore.Http.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
     at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGeneratorOptions.DefaultTagsSelector(ApiDescription apiDescription)
     at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGeneratorOptions.DefaultSortKeySelector(ApiDescription apiDescription) in Swashbuckle.AspNetCore.SwaggerGen.dll:token 0x600012d+0x0
     at System.Linq.EnumerableSorter`2.ComputeKeys(TElement[] elements, Int32 count) in System.Linq.dll:token 0x600040b+0x10
     at System.Linq.EnumerableSorter`1.ComputeMap(TElement[] elements, Int32 count) in System.Linq.dll:token 0x6000401+0x0
     at System.Linq.EnumerableSorter`1.Sort(TElement[] elements, Int32 count) in System.Linq.dll:token 0x6000402+0x0
     at System.Linq.OrderedEnumerable`1.GetEnumerator()+MoveNext() in System.Linq.dll:token 0x6000391+0x3d
     at System.Linq.Lookup`2.Create(IEnumerable`1 source, Func`2 keySelector, IEqualityComparer`1 comparer) in System.Linq.dll:token 0x6000366+0x2b
     at System.Linq.GroupedEnumerable`2.GetEnumerator() in System.Linq.dll:token …
Run Code Online (Sandbox Code Playgroud)

c# swagger swashbuckle.aspnetcore .net-6.0

10
推荐指数
1
解决办法
5049
查看次数

如何调整离子卡的长度?

好吧,我想标准化与上面相同的宽度,但是我什么也没做……我尝试过边距,宽度和其他,但是如果要更改卡的大小,则没有办法。我想保留默认值,您是否向我推荐一些命令,或者我做错了?我做的所有CSS命令都在home.scss中,谢谢大家。

在这里观看我的应用程序的打印

page-home {

  .bg{
    background: linear-gradient(to bottom, #00A399 0%, #fafafa 400%);
  }

  .bg-ions{
    background:#000;
    opacity:0.2;
  }

  .btn{
    background:#000;
    opacity:0.2;
    color:white;
  }

  ion-input{
    color:#FAFAFA;
  }

  ion-textarea{
    color:#FAFAFA;
  }

  ion-card{
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  ion-card-content{
    margin-left:-2%;
  }

  ion-item{
    width:50%;
  }

  .summ{
    color:#000;
  }

  ::placeholder {
    color: white;
    opacity: 1; /* Firefox */
  }

  :-ms-input-placeholder { /* Internet Explorer 10-11 */
    color: white;
  }

  ::-ms-input-placeholder { /* Microsoft Edge */
    color: white;
  }

}
Run Code Online (Sandbox Code Playgroud)
<br>
<ion-header>
  <ion-navbar>
    <ion-title>
      HybridSumm …
Run Code Online (Sandbox Code Playgroud)

ionic-framework ionic2 ionic3

5
推荐指数
1
解决办法
1万
查看次数

在 Adonis.js 为什么 refreshToken 为空?

我正在学习 Adonisjs 并想在我的 api rest 中实现注销部分,但是我不能因为每当我注销请求中的 refresh_token 时,但我不知道这个 refresh_token 来自哪里。我注意到当我登录时,我得到了一个“requestToken”参数,但无论如何它都是空的

当我登录时,它工作并返回类似的东西给我:

   {
      "type": "bearer",
      "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjEsImlhdCI6MTU3MTAxNTAwMH0.xXX6oDvdvdz59UJ2fstrFmOJEGP8luwKPtTeVF-Y224",
      "refreshToken": null
    }
Run Code Online (Sandbox Code Playgroud)

这是代码:

async login ({ request, auth }) { 
    const { email, password } = request.all()

    const token = await auth.attempt(email, password)

    return token
}

async logout({ request, response}) {
    const rules = {
      refresh_token: 'required'
    };

    const { refresh_token } = request.only(['refresh_token']);

    const validation = await validate({ refresh_token }, rules);

    const decrypted = Encryption.decrypt(refresh_token);

    if (!validation.fails()) {
      try {
        const refreshToken …
Run Code Online (Sandbox Code Playgroud)

node.js adonis.js

0
推荐指数
1
解决办法
725
查看次数