Spring 5 support
Or are there plans to support it?
There definite is a plan to support it. It will however have to wait till Open API support is completed.
Spring 5 was released. Do u have any progress?
@oleg-savko Unfortunately now. Would love some help on this one. Anyone wanting to help with that.
@dilipkrish - Would like to contribute to #1773,can you help me with getting started guide.
@amitsaluja frankly I haven't tried it andI don't know what it will take. I suspect certain functionality is not working or is broken.
- Start a project with spring 5
- See what is broken
- Come up with a solution and propose a pull request
- If it looks good and has tests to accompany it, i'll pull it in.
Thank you for wanting to help!
Hi @dilipkrish
I looked into it and I found out that there is a lot of job to do.
In webflux, there is no more package web.servlet but it changed to web.reactive which requires more changes than expected. If you want to support the older versions of Spring after release, you probably need to create new modules for webflux where new things will be done.
At the moment, there is 2 modules in the project which are dependent on springframework.web.servlet and directly use a lot of classes from it. Spring 5 has moved staff from there to org.springframework.web.reactive where also some structure and implementation of classes was changed.
Maybe it will be good to figure out how new modules would be organized in the future so the project will be easily maitained. What do you suggest?
Hi @dilipkrish, I think the WebFlux support will be a very important milestone for springfox. Follow with the finding from @xBATx , I would find there are 2 major update on springfox need your input.
- Dependency on "org.springframework.web.servlet.mvc" in RequestHandler.
- Module layout for webflex support
For (1), currently, RequestHandler depends on class NameValueExpression, PatternsRequestCondition and RequestMappingInfo is in webmvc package. They have the counter part in webflux "org.springframework.web.reactive" (see the link). Shall we consider.
- define a interface in springfox and adapt the webmvc and webflux class, or
- adapter the weblux model to webmvc model and not changing RequestHandler. For (2), my suggestion is to divide the model springfox-spring-web into springfox-spring-web-common, springfox-spring-webmvc, and springfox-spring-webflux for common class, webmvc and webflux support.
@MinosPong thanks for your detailed analysis. I would agree with your findings. I really don't have the bandwidth to work on this right now and could use some help.
swagger+netty server+webflux with kotlin is so cool.
@JackFish baby steps :)
Hello, I need this feature on my project. I have rewrite some code of springfox to work exclusively with spring-webflux, this take 4 hours to do. This work fine, there are two many dependency to broke :
- spring webmvc
- servlet-api
Now, I will try to rewrite my code to work with springmvc and spring-webflux in parallel. My big issue is that springfox-core depend of spring-webmvc, I think broke this dependency can broke some dependent projects.
Has someone already start a fork of springfox to work on that?
I have a verry first working swagger lib on this fork : https://github.com/deblockt/springfox
Is there anyone to work with me on this?
Hi, I checked out your project and managed to adopt it in one of my projects, currently migrated to spring-boot-2.0.0.M7.
Few things I noticed right away though,
- I used to have redirect to swagger-ui.html from /, now it says that this redirect cannot be resolved to view, which probably means its not registered since webflux isnt using webmvc.
- The Docket is always sending the requests to localhost:8080 even though the app is working on different port, so I will check this out. Managed to define .host() in my Docket to overcome this for now.
- I have custom Securities set for different Dockets and even though I authenticate succesfully in swagger the Headers are not being sent, but I think that this is problem of Swagger 2.8 not this project explicitly. (to note I was previously using 2.7, never migrated to 2.8)
@deblockt that is really cool!! Would love to help and answer any questions you might have. Let me know if you'd like access to this repo work on it.
@deblockt nice work! Your changes are working very well with webflux. I hope that it will be in a released version soon.
@deblockt Would you like to send a PR to pull your changes in.
Hi all, I also need springfox that is compatible with Spring 5 and Spring Data Kay. I've managed to get it working and passing the tests at https://github.com/iles-2e/springfox.
Now I haven't tried to support the new features in the Spring 5 as @deblockt , this is just updating dependencies and fixing broken API changes. In order to build the whole thing, I also needed to update Spring Boot, so this one uses recently released spring-boot:2.0.0.RC2.
I've read somewhere you're trying to support java 1.6+? With Spring 5 and all, the minimum is 1.8 so perhaps this is a good way to start springfox 3.x? We could remove Guava then as well...
@iles-2e thank you! I could use all the help. At the moment trying to get 2.8.1 out with some bug fixes. And 2.9.0 will be the last release with support for 1.6 with some improvements in model generation => #2056 and hopefully get to pull in @deblockt 's PR as well. The plan is to move to 3.x :) ... and java 8 \o/
Hey. Is there any timeline for version 2.9.0 with @deblockt 's PR?
@deblockt i tried your code and /v2/api-docs endpoint is giving the swagger json. but /swagger-ui.html is not working, have we changed the swagger-ui endpoint?