Skip to content

Commit

Permalink
Finish 0.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Emelyanov Alexandr committed Mar 4, 2019
2 parents 502138d + 60bc62b commit cba0590
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 6 deletions.
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ before_install:
- chmod u+x gradlew
before_deploy:
- ./gradlew generatePomFileForMavenPublication
deploy:
skip_cleanup: true
key:
secure: Koqvbo26cGgG5QHR9zSGojtvkVtRMxkd3rTejEyWHXnmjbDAnWVLeJf81pz6Vn2lrHbZkCHx+Ec4t3Cptq+v5fXlrgKtjYUORirMK4KWKT0ZLwE41oFo37Y8YVtRLlUiIk7BIteUbY6+p9HTlcQE60TCo9DugVX6Kn8c5tvBtukjckq3uL2/K+IIhtVbHCL6IEMKlQ0O0Wzvhe2m2qTIhAyCjnHgrTM9TxWYqxU5K0ShpL/OgySzXPcJPxy49jPDjp1FmtiMU/Lu5L7l1pzJ8vfWay7rfwJuu0VOy4cCno+8NFNEz5To08eDSIMsHovyqD7CnWkOOeEp9Vkd+D/Td1m2+7xX4UO1HqPmoTaSi2JrBo6FLDdfW+MWd5QGFsSP66hRSaEVV6AicgC1qreFqQQJKxl7XeLlXBt/HCN3qMhh0mKWggN76gnVV9yQY3n1QmtxLR3xgn8DC4xcAepYiDyUsxibVk1k5q1YHmGTpn2AfkrxhB5Dw97f/T8FrG2iO32NopieiugKh7Ln60TEsgDzsscyVic9OGEhQpCHVBI34jSO+/alh8ui+ULcNpreltJNk+tQAGejvMqDTEcYpAXKcuij2CzlFGchnBXnVnJquXP9i/s0s8k/VxARlrY8zUy2AM2lOq0LjNCEPm1whstv2lM2WmUi8mUwdzCFngI=
provider: bintray
file: "build/descriptor.json"
user: lex
on: develop
deploy:
skip_cleanup: true
key:
Expand Down
4 changes: 2 additions & 2 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Repository contains library for using springfox swagger UI under ZUUL proxy

## Requirements

- Gradle 3.x, or 4.x.
- Gradle 5.x.
- Java 8 or later

## License information
Expand Down Expand Up @@ -78,7 +78,7 @@ dependencies {

## Build

Gradle tasks may be running via `gradle` wrapper - `gradlew`(gradle v4.3.1) from project root folder.
Gradle tasks may be running via `gradle` wrapper - `gradlew` from project root folder.

* build: `gradle clean build`

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ apply plugin: 'maven-publish'
// project properties
group 'ru.reliabletech'
def libName = 'zuul-springfox-swagger'
version '0.2.0'
version '0.2.1'
sourceCompatibility = 1.8
def currentDate = LocalDate.now().format(DateTimeFormatter.ISO_DATE)

Expand Down
2 changes: 1 addition & 1 deletion descriptor.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"files":[
{"includePattern": "build/libs/(.*)", "uploadPattern": "ru/reliabletech/zuul-springfox-swagger/${version}/\$1"},
{"includePattern": "build/publications/maven/pom-default.xml", "uploadPattern": "ru/reliabletech/zuul-springfox-swagger/${version}/pom-${version}.xml"}
{"includePattern": "build/publications/maven/pom-default.xml", "uploadPattern": "ru/reliabletech/zuul-springfox-swagger/${version}/zuul-springfox-swagger-${version}.pom"}
],
"publish": true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public Optional<String> getServiceUrl(String route) {

public Optional<String> getServicePath(String route) {
return Optional.ofNullable(routes.get(route))
.map(ServiceInfo::getPath);
.map(ServiceInfo::getPath)
.map(path -> path.replaceAll("^/", "").replaceAll("/\\*\\*", ""));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ public class GenericSwaggerService implements SwaggerService {
public ObjectNode getSwaggerDoc(String route) {
ObjectNode swaggerDocumentation = getOriginalSwaggerDoc(route);
swaggerDocumentation.set("host", new TextNode(""));
swaggerDocumentation.set("basePath", new TextNode(servicesSwaggerInfo.getPrefix() + routeService.getPath(route)));
String path = new StringBuilder().append(servicesSwaggerInfo.getPrefix())
.append("/")
.append(routeService.getPath(route))
.toString()
.replaceAll("[/]+", "/");
swaggerDocumentation.set("basePath", new TextNode(path));
return swaggerDocumentation;
}

Expand Down

0 comments on commit cba0590

Please sign in to comment.