Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #2932 - Spring Boot 2.2.2 #3159

Merged

Conversation

JoGir
Copy link

@JoGir JoGir commented Oct 23, 2019

What's this PR do/fix?

  • Updated to SpringFramework 5.2.2.RELEASE and Spring Boot 2.2.2.RELEASE.
  • Integrated PluginRegistry changes

Are there unit tests? If not how should this be manually tested?

Nope ¯\_(ツ)_/¯, Compile-Task and tests run successful again

Any background context you want to provide?

Not sure about the nullability in springfox.documentation.schema.plugins.SchemaPluginsManager#viewProvider, added IllegalStateException if not available.

What are the relevant issues?

#2932

@JoGir
Copy link
Author

JoGir commented Oct 23, 2019

Please rebuild...

Execution failed for task ':springfox-swagger-ui:nodeSetup'.
> Could not resolve all files for configuration ':springfox-swagger-ui:detachedConfiguration1'.
   > Could not download node-linux-x64.tar.gz (org.nodejs:node:8.12.0)
      > Could not get resource 'https://nodejs.org/dist/v8.12.0/node-v8.12.0-linux-x64.tar.gz'.
         > Read timed out`

@ctruzzi
Copy link

ctruzzi commented Oct 26, 2019

@JoGir Usually closing an re-opening will start a build process.

@JoGir JoGir closed this Oct 28, 2019
@JoGir JoGir reopened this Oct 28, 2019
@JoGir JoGir changed the title Updated spring dependencies WIP - Updated spring dependencies Oct 28, 2019
@AndreasKl
Copy link
Contributor

@JoGir There is currently a broken test in your PR, the gist: Fixed-import-for-model-test contains a patch which fixes your PR. Maybe you could apply this patch or change the few lines of code.

@AndreasKl
Copy link
Contributor

I'll look into why this is broken again.

@JoGir
Copy link
Author

JoGir commented Dec 10, 2019

Some AssertionErrors look like an encoding issue Expected: 经度 got: ç»�度 😖
and we'll need patches for the Resource to EntityModel and Resources to CollectionModel changes.

@AndreasKl
Copy link
Contributor

AndreasKl commented Dec 10, 2019

Some AssertionErrors look like an encoding issue Expected: 经度 got: ç»�度 confounded
and we'll need patches for the Resource to EntityModel and Resources to CollectionModel changes.

I only had a look at the failing tests from the circleci for the first patch and did not rerun the whole suite, afaics springfox.documentation.spring.web.dummy.controllers.BugsController does not work as expected any more. Will have a look.

So the root cause for the endcoding issue is that since boot 2.2 the content-type was changed fromContent-Type: application/json;charset=UTF-8 to Content-Type: application/json. The default TestRestTemplate parsed the charset from the content type and used it, when there is no charset the default of ISO_8859_1 is used. Per spec application/json is always UTF-8.

@AndreasKl
Copy link
Contributor

After having fun with those contract test; the new patch:
https://gist.github.com/AndreasKl/666f669bd1b2c6dcc655e356ad88d2d9

BUILD SUCCESSFUL in 5m 35s
193 actionable tasks: 139 executed, 54 up-to-date
✔ ~/sc/springfoxbeevolution [bugfix/#2932-spring-boot-2.2.0|●2✚ 15] 

…d contract tests with Spring HATEOAS 1.x. Fixed wrong client encoding used in tests.
@codecov
Copy link

codecov bot commented Dec 11, 2019

Codecov Report

Merging #3159 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #3159      +/-   ##
============================================
+ Coverage      92.9%   92.92%   +0.02%     
- Complexity     3509     3511       +2     
============================================
  Files           382      382              
  Lines          9327     9331       +4     
  Branches        768      769       +1     
============================================
+ Hits           8665     8671       +6     
+ Misses          473      472       -1     
+ Partials        189      188       -1
Impacted Files Coverage Δ Complexity Δ
.../plugins/SpringRestDocsOperationBuilderPlugin.java 82.53% <100%> (ø) 16 <1> (ø) ⬇️
.../documentation/spring/web/DescriptionResolver.java 96% <100%> (+0.76%) 8 <1> (+1) ⬆️
...umentation/spring/web/scanners/ApiModelReader.java 95.46% <0%> (+0.56%) 88% <0%> (+1%) ⬆️

@JoGir JoGir changed the title WIP - Updated spring dependencies Fix #2932 - Spring Boot 2.2.2 Dec 11, 2019
@AndreasKl
Copy link
Contributor

@dilipkrish Are you planning to support Spring Boot 2.1.x (EOL November 1st 2020) and 2.2.x as 1.x is already EOL? Or should 2.2 support just go to master?

@SparkMonkey
Copy link

@AndreasKl Do you expect @dilipkrish to come back anytime soon ?

@AndreasKl
Copy link
Contributor

@SparkMonkey I talked to him a week ago over LinkedIn and he would like to continue to invest in this project.

@dilipkrish dilipkrish added the PR label Jan 6, 2020
@dilipkrish dilipkrish added this to the 3.0 milestone Jan 6, 2020
@dilipkrish
Copy link
Member

Than you @JoGir this is super helpful as I get back to working on this project!

@dilipkrish dilipkrish merged commit 6f15b63 into springfox:master Jan 6, 2020
@dilipkrish
Copy link
Member

Thank you @JoGir!!

@dilipkrish
Copy link
Member

Closes #2932

@YShane
Copy link

YShane commented Mar 9, 2020

It's still broken in 2.2.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants