swagger json 模式位于何处?

Where is the swagger json schema located?

help for swashbuckle 提到 Swagger 的 ui 是由生成的 json 模式驱动的。

此 json 文件位于何处? 我在我的 asp.net 项目

的文件夹中找不到它

当我实际 运行 应用程序并导航到 http://localhost:51659/swagger/v1/swagger.json

然后我看到 json

它在磁盘上的什么位置?还是只存在于记忆中?

没有生成文件,只存在于内存中。

您可能需要阅读一下代码: https://github.com/domaindrivendev/Swashbuckle/blob/master/Swashbuckle.Core/Swagger/SwaggerGenerator.cs

如果您需要一个文件,您可以创建一个 IDocumentFilter 来生成一个文件。
我这里有一个生成 Yaml 文件的示例:
https://github.com/heldersepu/Swagger-Net-Test/blob/master/Swagger_Test/App_Start/SwaggerConfig.cs#L378