Affects: 6
There are some OpenAPI/Swagger 3rd supports for Spring, such as:
I have used both of them in projects in the past years. Now Spring Fox is discontinued, for most of Spring developers, Spring Doc maybe the only choice.
But recently I encountered famous OutOfMemeory error issue caused by the ClassGraph lib which is a dependency of spring doc. Ideally, I do not think Spring Doc requires another class scan besides the Spring components scan, it makes my project failed to build on Github actions even I upgraded to a custom larger runner with 4core+16G and adjust my Gradle jvm args to increase the heap size.
OpenAPI v3 is a standard now, a lot of frameworks etc, Quarkus/Micronaut, etc, even MicroProfile provides OpenAPI integrations.
Like the support of ProblemDetails spec, as a Spring developer, I hope OpenAPI support becomes part of Spring framework.
Comment From: bclozel
We don't have any plans to invest in OpenAPI support at the Framework level right now. We are maintaining the Spring REST Docs project in this space already and we think that this approach is better suited to API documentation and testing. There are numerous community starters maintained by the community and the Spring team wouldn't have the bandwidth to support them all "officially".
As discussed on Gitter, you should reach out to the project maintainers about this OOM. I don't think it's a reason by itself to completely ditch the project. If you think that the ClassGraph
usage is not required, maybe you can help the project to adopt a different strategy for this?
We can reopen this issue if we reconsider this decision in the future. Thanks!