从 Spring MVC 控制器自动生成 REST api 文档到 RAML

Auto generate REST api documentation into RAML from Spring MVC controllers

我是 Spring-Boot 的新手。我想从我的 Spring MVC 控制器将我的 REST api 文档自动生成到 RAML 中。有什么办法吗?或者任何我可以使用它来将我的休息 api 生成到 RAML 中的指南?

Spring REST Docs: https://github.com/ePages-de/restdocs-raml However, this project is not maintained anymore and the authors recommend to use their new project https://github.com/ePages-de/restdocs-openapi that converts to OpenAPI (Swagger) instead of RAML. They provide a guide on how to convert OpenAPI to RAML: https://github.com/ePages-de/restdocs-openapi#convert-to-raml There is an example project that demonstrates the conversion to OpenAPI and RAML https://github.com/ePages-de/restdocs-openapi/tree/master/samples/restdocs-openapi-sample 有一个 Spring REST Docs to RAML 扩展,该扩展的一个限制是它目前仅适用于 Gradle。

我知道,你的问题已经过时了,但有些东西可能会有所帮助。

您可以使用 DocDog。它从那里从现有的源代码创建 RAML。如果它是 SpringBoot,您可以 运行 轻松使用 -lang=spring。如果它是普通的 JAVA 您可以在代码中添加注释(参见 readme.md 或示例),以便 DogDoc 可以理解。

希望对你有帮助:https://github.com/skalski/docdog