是否有任何理由仅使用 swagger/docs/v1 以 JSON 的形式生成 swagger 元数据

Is there any reason using only swagger/docs/v1 for generating swagger metadata in the form JSON

我目前正在研究 Azure API 应用程序服务,因为我对使用 swashbuckler 生成 swagger 元数据有点困惑。为此,我阅读了以下文档,其中提到要查看您的元数据,只需在 API url.

末尾添加 swagger/docs/v1

https://docs.microsoft.com/en-us/azure/app-service-api/app-service-api-dotnet-get-started

我也做了同样的事情,我能够以 JSON 的形式看到我的元数据生成。但是当我在 API url 的末尾添加 swagger/help/v1 或 swagger/help/v2 时,我没有得到 JSON.[=13= 形式的任何元数据]

是否有任何理由仅使用 swagger/docs/v1 来生成 JSON 形式的 swagger 元数据或其他也允许的形式,如 swagger/help/v1 等

Swashbuckle 的默认路径是 /swagger/docs/v1,Swashbuckle docs show how to change that path

httpConfiguration
    .EnableSwagger("docs/help/{apiVersion}", c => c.SingleApiVersion("v1", "A title for your API"))
    .EnableSwaggerUi("sandbox/{*assetPath}");

在这种情况下,swagger json 的 URL 将是 docs/help/v1 而 swagger-ui 的 url 将是 sandbox/index.