forked from springfox/springfox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature(webflux): add webflux project
there is the first usable version of webflux project. there are a error while building swagger-ui webjar. the jar is empty. We must use old webjar before fix.
- Loading branch information
Thomas Deblock
committed
Jan 23, 2018
1 parent
e945224
commit d5867d2
Showing
143 changed files
with
1,339 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2.9.0-SNAPSHOT | ||
2.9.1-SNAPSHOT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Sun Jan 14 11:40:26 CST 2018 | ||
#Mon Jan 22 15:52:00 CET 2018 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-all.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
dependencies { | ||
compile project(':springfox-core') | ||
|
||
provided libs.clientProvidedServlet | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file modified
0
springfox-spring-web/src/test/java/springfox/documentation/spring/web/dummy/DummyClass.java
100755 → 100644
Empty file.
Empty file modified
0
springfox-spring-web/src/test/java/springfox/documentation/spring/web/dummy/DummyModels.java
100755 → 100644
Empty file.
Empty file modified
0
...rc/test/java/springfox/documentation/spring/web/dummy/controllers/AbstractPetService.java
100755 → 100644
Empty file.
Empty file modified
0
...b/src/test/java/springfox/documentation/spring/web/dummy/controllers/BusinessService.java
100755 → 100644
Empty file.
Empty file modified
0
...fox/documentation/spring/web/dummy/controllers/ControllerWithNoRequestMappingService.java
100755 → 100644
Empty file.
Empty file modified
0
...b/src/test/java/springfox/documentation/spring/web/dummy/controllers/ExcludedService.java
100755 → 100644
Empty file.
Empty file modified
0
...b/src/test/java/springfox/documentation/spring/web/dummy/controllers/FancyPetService.java
100755 → 100644
Empty file.
Empty file modified
0
...ava/springfox/documentation/spring/web/dummy/controllers/FeatureDemonstrationService.java
100755 → 100644
Empty file.
Empty file modified
0
.../src/test/java/springfox/documentation/spring/web/dummy/controllers/InheritedService.java
100755 → 100644
Empty file.
Empty file modified
0
.../test/java/springfox/documentation/spring/web/dummy/controllers/InheritedServiceImpl.java
100755 → 100644
Empty file.
Empty file modified
0
...rc/test/java/springfox/documentation/spring/web/dummy/controllers/PetGroomingService.java
100755 → 100644
Empty file.
Empty file modified
0
...ng-web/src/test/java/springfox/documentation/spring/web/dummy/controllers/PetService.java
100755 → 100644
Empty file.
Empty file modified
0
...ox-spring-web/src/test/java/springfox/documentation/spring/web/dummy/models/EnumType.java
100755 → 100644
Empty file.
Empty file modified
0
...fox-spring-web/src/test/java/springfox/documentation/spring/web/dummy/models/Example.java
100755 → 100644
Empty file.
Empty file modified
0
...ox-spring-web/src/test/java/springfox/documentation/spring/web/dummy/models/FancyPet.java
100755 → 100644
Empty file.
Empty file modified
0
...-spring-web/src/test/java/springfox/documentation/spring/web/dummy/models/NestedType.java
100755 → 100644
Empty file.
Empty file modified
0
springfox-spring-web/src/test/java/springfox/documentation/spring/web/dummy/models/Pet.java
100755 → 100644
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
ext { | ||
limits = [ | ||
'instruction': 96.5, | ||
'branch' : 91, | ||
'line' : 96.5, | ||
'complexity' : 92, | ||
'method' : 96, | ||
'class' : 100 | ||
] | ||
} | ||
|
||
dependencies { | ||
compile "org.reflections:reflections:$reflections" | ||
compile libs.core | ||
compile libs.spring | ||
compile project(':springfox-spi') | ||
compile project(':springfox-schema').sourceSets.main.output | ||
compile project(':springfox-spring-web') | ||
|
||
provided libs.springProvidedWithFlux | ||
provided libs.clientProvidedServlet | ||
|
||
testCompile "javax.validation:validation-api:$validationApiVersion" | ||
testCompile project(':springfox-core') | ||
testCompile project(':springfox-spring-web').sourceSets.test.output | ||
testCompile libs.test | ||
testCompile libs.swagger2Core | ||
testCompile project(':springfox-core').sourceSets.test.output | ||
testCompile project(':springfox-schema').sourceSets.test.output | ||
} |
39 changes: 39 additions & 0 deletions
39
...-webflux/src/main/java/springfox/documentation/spring/web/NameValueExpressionWrapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package springfox.documentation.spring.web; | ||
|
||
import springfox.documentation.springWrapper.NameValueExpression; | ||
|
||
import java.util.HashSet; | ||
import java.util.Set; | ||
|
||
public class NameValueExpressionWrapper<T> implements NameValueExpression { | ||
private org.springframework.web.reactive.result.condition.NameValueExpression<T> e; | ||
|
||
public static <T> Set<NameValueExpression<T>> from(Set<org.springframework.web.reactive.result.condition.NameValueExpression<T>> springSet) { | ||
Set<NameValueExpression<T>> wrapped = new HashSet<NameValueExpression<T>>(); | ||
|
||
for (org.springframework.web.reactive.result.condition.NameValueExpression e: springSet) { | ||
wrapped.add(new NameValueExpressionWrapper<T>(e)); | ||
} | ||
|
||
return wrapped; | ||
} | ||
|
||
public NameValueExpressionWrapper(org.springframework.web.reactive.result.condition.NameValueExpression<T> e) { | ||
this.e = e; | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return this.e.getName(); | ||
} | ||
|
||
@Override | ||
public Object getValue() { | ||
return this.e.getValue(); | ||
} | ||
|
||
@Override | ||
public boolean isNegated() { | ||
return this.e.isNegated(); | ||
} | ||
} |
57 changes: 57 additions & 0 deletions
57
...ring-webflux/src/main/java/springfox/documentation/spring/web/ObjectMapperConfigurer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* | ||
* | ||
* Copyright 2015 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
* | ||
*/ | ||
|
||
package springfox.documentation.spring.web; | ||
|
||
import com.fasterxml.jackson.databind.ObjectMapper; | ||
import org.springframework.beans.BeansException; | ||
import org.springframework.beans.factory.config.BeanPostProcessor; | ||
import org.springframework.context.ApplicationEventPublisher; | ||
import org.springframework.context.ApplicationEventPublisherAware; | ||
import org.springframework.http.codec.json.Jackson2JsonEncoder; | ||
import springfox.documentation.schema.configuration.ObjectMapperConfigured; | ||
|
||
|
||
public class ObjectMapperConfigurer implements BeanPostProcessor, ApplicationEventPublisherAware { | ||
|
||
private ApplicationEventPublisher applicationEventPublisher; | ||
|
||
@Override | ||
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { | ||
if (bean instanceof Jackson2JsonEncoder) { | ||
Jackson2JsonEncoder encoder = (Jackson2JsonEncoder) bean; | ||
fireObjectMapperConfiguredEvent(encoder.getObjectMapper()); | ||
} | ||
return bean; | ||
} | ||
|
||
@Override | ||
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { | ||
return bean; | ||
} | ||
|
||
@Override | ||
public void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) { | ||
this.applicationEventPublisher = applicationEventPublisher; | ||
} | ||
|
||
private void fireObjectMapperConfiguredEvent(ObjectMapper objectMapper) { | ||
applicationEventPublisher.publishEvent(new ObjectMapperConfigured(this, objectMapper)); | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
springfox-spring-webflux/src/main/java/springfox/documentation/spring/web/PatternUtil.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package springfox.documentation.spring.web; | ||
|
||
import org.springframework.web.util.pattern.PathPattern; | ||
|
||
import java.util.HashSet; | ||
import java.util.List; | ||
import java.util.Set; | ||
|
||
public class PatternUtil { | ||
|
||
public static Set<String> toListString(Set<PathPattern> patterns) { | ||
Set<String> paths = new HashSet<String>(); | ||
for (PathPattern p: patterns) { | ||
paths.add(p.getPatternString()); | ||
} | ||
return paths; | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
...lux/src/main/java/springfox/documentation/spring/web/PatternsRequestConditionWrapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package springfox.documentation.spring.web; | ||
|
||
import org.springframework.web.reactive.result.condition.PatternsRequestCondition; | ||
import org.springframework.web.util.pattern.PathPattern; | ||
|
||
import java.util.HashSet; | ||
import java.util.Set; | ||
|
||
public class PatternsRequestConditionWrapper implements springfox.documentation.springWrapper.PatternsRequestCondition<PatternsRequestCondition> { | ||
|
||
private org.springframework.web.reactive.result.condition.PatternsRequestCondition condition; | ||
|
||
public PatternsRequestConditionWrapper(org.springframework.web.reactive.result.condition.PatternsRequestCondition condition) { | ||
this.condition = condition; | ||
} | ||
|
||
@Override | ||
public springfox.documentation.springWrapper.PatternsRequestCondition combine(springfox.documentation.springWrapper.PatternsRequestCondition<PatternsRequestCondition> other) { | ||
if (other instanceof PatternsRequestConditionWrapper) { | ||
return new PatternsRequestConditionWrapper(this.condition.combine(((PatternsRequestConditionWrapper) other).condition)); | ||
} | ||
return this; | ||
} | ||
|
||
@Override | ||
public Set<String> getPatterns() { | ||
return PatternUtil.toListString(this.condition.getPatterns()); | ||
} | ||
|
||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (o instanceof PatternsRequestConditionWrapper) { | ||
return this.condition.equals(((PatternsRequestConditionWrapper) o).condition); | ||
} | ||
return false; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return this.condition.hashCode(); | ||
} | ||
|
||
|
||
|
||
} | ||
|
9 changes: 9 additions & 0 deletions
9
...g-webflux/src/main/java/springfox/documentation/spring/web/RequestMappingInfoWrapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package springfox.documentation.spring.web; | ||
|
||
import org.springframework.web.reactive.result.method.RequestMappingInfo; | ||
|
||
public class RequestMappingInfoWrapper implements springfox.documentation.springWrapper.RequestMappingInfo { | ||
|
||
public RequestMappingInfoWrapper(RequestMappingInfo info) { | ||
} | ||
} |
Oops, something went wrong.