Autorest error - swagger.json' is not a valid OpenAPI 2.0 definition (expected 'swagger: 2.0')

后端 未结 1 1991
感动是毒
感动是毒 2021-01-18 15:16

My api is running net core 3.0 with Swashbuckle.AspNetCore 5.0.0-rc5

When I run autorest on my generated swagger.json file I get:

swagger.json is not         


        
相关标签:
1条回答
  • 2021-01-18 16:13

    Followed this thread, auto rest doesn’t support latest open api yet but there are workarounds

    https://github.com/Azure/autorest/issues/2680

    You can do this:

    app.UseSwagger(o => o.SerializeAsV2 = true);
    
    0 讨论(0)
提交回复
热议问题