我已经关注了instructions to create a Swagger documentation,现在可以使用Swagger UI获取我的文档 . 我'd like to also generate the documentation as JSON or YAML so it'易于导入,例如邮差,但我在 SwaggerModule
中找不到任何合适的方法,Swagger UI也没有任何导出按钮 .
我已经关注了instructions to create a Swagger documentation,现在可以使用Swagger UI获取我的文档 . 我'd like to also generate the documentation as JSON or YAML so it'易于导入,例如邮差,但我在 SwaggerModule
中找不到任何合适的方法,Swagger UI也没有任何导出按钮 .
1 回答
根据这个github issue,您可以将创建的Swagger
document
字符串化,例如将它写入文件系统,如下所示: