Skip to content

3.0.0

Latest
Compare
Choose a tag to compare
@dilipkrish dilipkrish released this 14 Jul 03:19
· 49 commits to master since this release

Release Notes

image
Picture Credit National Geographic

First and foremost a big thank you to the community for keeping me motivated to work on this project. There have been some really amazing contributions in this release in terms of code, comments, bug reports and it is humbling to see people jumping in to solve problems on the issue forum. It sure motivated me to get over the "hump" and start working on in earnest. What better way to lose the COVID blues!

Thank you! 🥳 🍾

Also please welcome the newest maintainer to the springfox team @MaksimOrlov. A lot of the great work you see in the model generation support is due to his efforts, collaborating tirelessly on weekends and not giving up while ensuring the model generation engine is performant 👏

NOTE: This is a breaking change release, I've tried to maintain backwards compatibility with earlier versions of springfox as much as possible. Deprecated APIs prior to 2.9 have been aggressively removed and new APIs that will go away in the near future have been marked. So please look out for those and do report anything that has been missed.

Highlights of this release include

  • Spring 5, Webflux support (only request mapping support, functional endpoints aren't supported yet)
  • Spring Integration support (feedback is much appreciated)
  • Spring Boot support springfox-boot-starter dependency (Zero Config, Autoconfiguration support)
  • Documented Configuration Properties with autocomplete
  • Better specification compatibility with 2.0
  • Support for OpenApi 3.0.3
  • Zero Dependency (almost, the only libraries needed are spring-plugin, pswagger-core](https://github.com/swagger-api/swagger-core)
  • Existing swagger2 annotations will continue to work and enrich open api 3.0 specification

Compatibility Notes

  • Requires Java 8
  • Requires Spring 5.x (not tested with earlier versions
  • Requires SpringBoot 2.2+ (not tested with earlier versions)

Contributions

Significant contributions that come to mind (and please remind me of others in this list cos' my memory is weak)

  • @MaksimOrlov for his work on better model generation (json view, validation groups, request/response models)
  • @dschulten for introducing spring integration support
  • @deblockt and @ligasgr for their work on webflux support
  • @ile for spring 5 support
  • @neil1hart for removing the guava dependencies
  • and @cbornet for the occasional nudges to working on this release :)

Pull Requests

Bug Fixes

  • Parameter 0 of constructor in springfox.documentation.spring.data.rest.EntityServicesProvider required a bean of type 'javax.servlet.ServletContext' that could not be found. (#3382) by @desiderati
  • Model property order is no longer respected as of 2.9.2 (#3087) by @dilipkrish
  • Base URL is wrong with 3.0.0.SNAPSHOT waiting-for-more-info (#3030) by @ogerardin
  • Example property on operations does not work (#2767) by @dilipkrish
  • JsonView Is not working as expected (#3373) by @dilipkrish
  • Provide intelligent defaults for web flux types Mono and Flux maintenance (#3354) by @dilipkrish
  • How to detect Spring MultipartFile paramter in ApiModel annotated POJOs and show file upload button in Swagger-UI (#1370) by @roseoxhu
  • Unable to infer base url... springfox-swagger2 version 2.9.2 (#3001) by @lombocska
  • swagger-ui.min.js and jquery1.8.0.min.js fail to load on AWS Lambda using Sprint Boot 2 (#3289) by @thomashoef
  • ApiInfo in Docket will not contain old value if parameter is null. (#3314) by @Snap252
  • Response Model with Map can not be showed the details in response (#3297) by @dianfenzhan
  • 502 bad gateway when deploying to AWS, works locally. (#3300) by @AliZarrouk
  • Swagger UI is not showing fileupload button for RequestBody of type Byte Array (#3364) by @lakshmitharun
  • Missing "content-type" header during POST request and missing properties in swagger-ui screen (#3353) by @gwcakep
  • springfox-swagger2:3.0.0-SNAPSHOT Generates conflict of the beans 'requestMappingHandlerAdapter (#3342) by @josuemojena
  • Infinity loop when starting spring boot server (#2907) by @Tandolf
  • springfox-swagger 3.0.0 - SNAPSHOT - JSON schema not being generated as it was before te update (#3343) by @pmroch
  • Missing #ref in JSON when using Map<String,Map<String,List>> as a response type. (#3356) by @vpm911
  • Swagger UI is not able to submit form data with file attachment & JSON parameter (#3311) by @mobasherswl
  • NPE on EnumMapper.maybeAddAllowableValuesToParameter(EnumMapper.java:117) (#3339) by @othellico
  • In 3.0.0-SNAPSHOT, using the ModelAndView parameter, an error log appears. (#3380) by @wangxin
  • ResponseHeader is not working as expected (#3374) by @dilipkrish
  • ResponseHeader annotation not parsed? (#2684) by @watery
  • Swagger does not respect Jackson @JsonIgnoreProperties annotation (#2613) by @guan25
  • @ExampleProperty/value is getting ignored (#3037) by @napolev
  • Unable to scan documentation context default java.lang.NullPointerException: null (#3303) by @WesleyBlancoYuan
  • Oauth 2.0 redirect_uri params is not an absolute URL using 3.0.0-SNAPSHOT (#3368) by @Tqup3
  • Swagger-ui is incorrectly using a base path when you "Try Out" the api (#3351) by @dilipkrish
  • SecurityContext#securityForOperation unespected behaviour if using only operationSelector (#3361) by @Aitor1405
  • springfox-swagger2:3.0.0-SNAPSHOT Access denied to: springfox-swagger2-3.0.0-20200629.123820-84.jar (#3357) by @kentilini
  • swagger-2.9.1 /csrf is 404 (#2603) by @hxiugangxh
  • Unable to find a model that matches key in 3.0-SNAPSHOT and Spring WebFlux (#3348) by @mdsina
  • AllowableValues for @ApiParam is not honored by Swagger when request parameter is Collection Array (#3321) by @SarveshSharma06
  • Docket.apiInfo never reverts to default (#3327) by @jensgram
  • Spring fox not accepting size parameter for uuid (#3329) by @manya0810
  • When using javax.validation.constraints annotation on method parameters,the parameter is recognized as the request body (#3338) by @zx472010602
  • When @EnableSwagger2WebFlux is used, Failed to start bean 'documentationPluginsBootstrapper' (#3340) by @DongDDo
  • Add Implementation-Version to MANIFEST.MF (#3341) by @seregamorph
  • Exception in Spring Boot 2.0.1 (#2345) by @fischest
  • Suffix with number like "_1" is added to duplicated object name. (#3014) by @pitzcarraldo
  • Springfox Bean Validations @SiZe annotation does not work properly on List (#3255) by @shouldnotappearcalm
  • SpringDataRest with multiple DTO-s (#3082) by @csegedicsaba
  • discriminator field is set incorrectly in ModelBuilder (typo?) (#3118) by @weaselflink
  • x-forwarded-prefix ignored with springfox webflux (#3157) by @jgcollings
  • SpringRestDocsOperationBuilderPlugin won't load resources from a jar (#3178) by @ogerardin
  • @ApiParam(example="..") doesn't work for @requestbody (#2822) by @StasKolodyuk
  • SpringDataRest Pageable resuorce page and size parameter generated with wrong type (#3075) by @csegedicsaba
  • Error on use X-Forwarded-Prefix and ForwardedHeaderFilter (#2622) by @diegobmd
  • No API Generation with Webflux, Swagger 3.0.0-SNAPSHOT AND spring integration (#2967) by @Numbernick
  • Typo in docs (#2665) by @rfigueroa
  • Since version 2.9.0, APIs with @PathVariable are not picked up anymore due to Spring 4.3.3 code help-wanted (#2511) by @dbaje

Maintenance

Features

  • How to configure spring integration (#797) by @ghost
  • Keep property on response, but hide from request (#895) by @wind57
  • Pageable support should not be only springfox-data-rest wontfix (#2761) by @c
  • Polymorphism can lead to a recursive model wontfix (#2724) by @shartte
  • Add better support for non-spring boot apps (#3366) by @dilipkrish
  • support password format for parameter (#3002) by @natrem
  • Bean Validation @null annotation should result in readOnly (#2861) by @hsynkrtl
  • Not preserving the parameter order when creating API using Java Configuration in springfox 2.9.2 can-use-for-docs (#2705) by @Manish794
  • Spring 5 support (#1773) by @pabl0rg
  • Add support for @JSONVIEW (#563) by @trycatchblock
  • Optional ACAHs: X-XSRF-TOKEN (#2578) by @iutipikin
  • Bean Validation @notblank should be supported (#2719) by @ghost
  • add support for the showCommonExtensions configuration option of swagger-ui (#2402) by @guyv
  • Springfox does not apply JacksonXml annotations #(2734) by @norbson
  • Errors on using @EnableSwagger 2 with version 2.9.0 #(2501) by @PrateekSB
  • @deprecated annotation on class(Controller),the view does't show deprecated tag (horizontal line) #(2638) by @wdyun
  • Unable to infer base url with Spring 5 and Boot 2 #(2710) by @mapto
  • Replace a String parameter documentation with the corresponding full type model? #(2523) by @watery
  • Support for Response examples #(1570) by @yangwangxing