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

Feature/spring5 #2273

Merged
merged 19 commits into from Jul 11, 2018
Merged

Feature/spring5 #2273

merged 19 commits into from Jul 11, 2018

Conversation

iles-2e
Copy link
Contributor

@iles-2e iles-2e commented Mar 1, 2018

What's this PR do/fix?

Updates dependencies to match those in Spring Boot 2

  • springBoot 1.5.9.RELEASE -> 2.0.0.RELEASE
  • spring 4.3.9.RELEASE -> 5.0.4.RELEASE
  • springDataRest 2.6.9.RELEASE -> 3.0.5.RELEASE

Minimum JDK version is updated to 1.8 (Spring requirement)

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

No new methods were added nor was any method removed, thus no new unit tests. Code fixes were limited to fixing API incompatible changes after the upgrade.

Any background context you want to provide?

My motivation was to make Springfox work in a Spring5 environment. I'm using it in a project running Spring MVC (5) and Spring Data Rest (Kay).

What are the relevant issues?

#1773
#1957

@iles-2e
Copy link
Contributor Author

iles-2e commented Mar 1, 2018

Tests probably failed due to running under Java 7:

Support for running Gradle using Java 7 has been deprecated and is scheduled to be removed in Gradle 5.0.

@PascalSchumacher
Copy link
Contributor

PascalSchumacher commented Mar 1, 2018

https://github.com/springfox/springfox/blob/master/circle.yml uses java 7, so that has to be updated too.

@codecov
Copy link

codecov bot commented Mar 1, 2018

Codecov Report

Merging #2273 into master will increase coverage by 0.05%.
The diff coverage is 96.56%.

@@             Coverage Diff              @@
##             master    #2273      +/-   ##
============================================
+ Coverage     95.03%   95.08%   +0.05%     
- Complexity     3057     3101      +44     
============================================
  Files           340      341       +1     
  Lines          7809     7828      +19     
  Branches        596      597       +1     
============================================
+ Hits           7421     7443      +22     
+ Misses          240      238       -2     
+ Partials        148      147       -1

@iles-2e
Copy link
Contributor Author

iles-2e commented Mar 1, 2018

@PascalSchumacher Good catch! Thank you! :)

@dilipkrish
Copy link
Member

Thanks for the PR!! just FYI I will hold it in the wings, just a little bit until we get 2.9.0 out of the way (the last supported version using 1.6 jdk)

Conflicts:
	gradle/dependencies.gradle
@bastelfreak
Copy link

Hi @iles-2e, thanks for the work!
@dilipkrish thanks for the awesome project. Do you have any rough ETA for this? I would love to use swagger-ui on my new springboot v2 project.

@dilipkrish
Copy link
Member

Thanks @bastelfreak. Sometime in April mid I'd reckon

@dilipkrish dilipkrish added the PR label Mar 10, 2018
@springfox springfox deleted a comment Mar 14, 2018
@springfox springfox deleted a comment Mar 14, 2018
@ronanquillevere
Copy link

👍

@raderio
Copy link

raderio commented Apr 3, 2018

just a little bit until we get 2.9.0 out of the way (the last supported version using 1.6 jdk)

any ETA for 2.9.0?

@dilipkrish
Copy link
Member

In the next few days

@predrag-viceic
Copy link

Hello !

Is this feature being merged in 2.9.0 ? I have tried the build snapshots, but still get the exception.

@dilipkrish
Copy link
Member

@predrag-viceic it will be merged in post 2.9.0

@iles-2e would you mind squashing your merge commits? Let me know if you need help with that.

@mikezerosix
Copy link

@dilipkrish "post 2.9.0" is a bit vaque.

With current Spring Boot (Data REST) version the Swagger 2 is and has been completely broken for a while now.

As it is now Swagger in completely unusable for modern SW development.

@dilipkrish
Copy link
Member

unusable for modern SW development

@mikezerosix thats a pretty broad statement :)

Anyways, trying to get a release to maven central and the next release will be focused on spring5/boot2/oas 3.0 compatibility.

@iles-2e
Copy link
Contributor Author

iles-2e commented May 9, 2018

@dilipkrish sorry for the late reply... merged recent changes again and squashed previous merge commits.

@predrag-viceic
Copy link

Hello,

Any ETA on this feature ? This project is extremely useful and I have some models that are used only in spring data rest.. For now I'm implementing some fake spring mvc services so the models get exported in the documentation, but it would be really cool to have at least the level of features we had with spring 4..

Anyway, thanks a lot for your work !

@dilipkrish
Copy link
Member

@predrag-viceic sorry its taking a bit of time. Hopefully in the next couple of months

@predrag-viceic
Copy link

@iles-2e

Hello,
I have built your branch, and after some tweaks, it works pretty well ! Thanks !

I have a question: is it possible to document the association endpoints? ie, right now, They are correctly generated, but with names such as baseentityAssociation, and there is no way to add @ApiOperation comment to these because they do not really exist at the <Crud, pagingAndSorting,etc..>interface level.

@dilipkrish
Copy link
Member

@iles-2e Sorry Im just getting to this PR, I didn't realize there was a PR for upgrading spring data rest. I updated master to support this and also be java 8 source compliant. Since I dont have context into some of your changes, which may include bug fixes as well, would you be able to resolve the merge conflicts.

Conflicts:
	gradle/dependencies.gradle
	springfox-data-rest/src/main/java/springfox/documentation/spring/data/rest/EntityAssociationDeleteExtractor.java
	springfox-data-rest/src/main/java/springfox/documentation/spring/data/rest/EntityAssociationGetExtractor.java
	springfox-data-rest/src/main/java/springfox/documentation/spring/data/rest/EntityAssociationItemDeleteExtractor.java
	springfox-data-rest/src/main/java/springfox/documentation/spring/data/rest/EntityAssociationItemGetExtractor.java
	springfox-data-rest/src/main/java/springfox/documentation/spring/data/rest/EntityAssociationSaveExtractor.java
	springfox-data-rest/src/main/java/springfox/documentation/spring/data/rest/EntityAssociationsExtractor.java
	springfox-data-rest/src/main/java/springfox/documentation/spring/data/rest/EntityContext.java
	springfox-data-rest/src/main/java/springfox/documentation/spring/data/rest/EntityDeleteExtractor.java
	springfox-data-rest/src/main/java/springfox/documentation/spring/data/rest/EntityFindAllExtractor.java
	springfox-data-rest/src/main/java/springfox/documentation/spring/data/rest/EntityFindOneExtractor.java
	springfox-data-rest/src/main/java/springfox/documentation/spring/data/rest/EntitySaveExtractor.java
	springfox-data-rest/src/main/java/springfox/documentation/spring/data/rest/EntitySearchExtractor.java
	springfox-data-rest/src/main/java/springfox/documentation/spring/data/rest/EntityServicesProvider.java
	springfox-schema/src/main/java/springfox/documentation/schema/property/OptimizedModelPropertiesProvider.java
	springfox-spring-web/src/main/java/springfox/documentation/spring/web/ControllerNamingUtils.java
	swagger-contract-tests/build.gradle
@iles-2e
Copy link
Contributor Author

iles-2e commented Jul 9, 2018

@dilipkrish sorry for the late response... I merged the default and resolved the conflicts. My changes were mostly dependency upgrade and introduction of Optional due to Spring Data API change, plus some code duplication removal.

Also there is a fix for Jackson upgrade above 2.9 version. They started to pick up setterless properties which in most cases (at least in tests) are false positive so the fix was to revert the behavior.

@dilipkrish dilipkrish merged commit 79c8ae9 into springfox:master Jul 11, 2018
@dilipkrish
Copy link
Member

Thank you @iles-2e I've merged it in finally! sorry for the long wait!

@dilipkrish dilipkrish added this to the 3.0 milestone Jul 11, 2018
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

8 participants