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

rc 4.5.0 #714

Merged
merged 5 commits into from
Mar 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<groupId>bio.overture</groupId>
<artifactId>song</artifactId>
<packaging>pom</packaging>
<version>4.4.0</version>
<version>4.5.0</version>
<modules>
<module>song-core</module>
<module>song-java-sdk</module>
Expand Down
6 changes: 3 additions & 3 deletions song-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<artifactId>song</artifactId>
<groupId>bio.overture</groupId>
<version>4.4.0</version>
<version>4.5.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -35,12 +35,12 @@
<dependency>
<groupId>bio.overture</groupId>
<artifactId>song-java-sdk</artifactId>
<version>4.4.0</version>
<version>4.5.0</version>
</dependency>
<dependency>
<groupId>bio.overture</groupId>
<artifactId>song-core</artifactId>
<version>4.4.0</version>
<version>4.5.0</version>
</dependency>

<!-- CLI -->
Expand Down
2 changes: 1 addition & 1 deletion song-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<artifactId>song</artifactId>
<groupId>bio.overture</groupId>
<version>4.4.0</version>
<version>4.5.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion song-java-sdk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<artifactId>song</artifactId>
<groupId>bio.overture</groupId>
<version>4.4.0</version>
<version>4.5.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
4 changes: 2 additions & 2 deletions song-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<artifactId>song</artifactId>
<groupId>bio.overture</groupId>
<version>4.4.0</version>
<version>4.5.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -37,7 +37,7 @@
<dependency>
<groupId>bio.overture</groupId>
<artifactId>song-core</artifactId>
<version>4.4.0</version>
<version>4.5.0</version>
</dependency>

<!-- Spring -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.paths.RelativePathProvider;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger.web.UiConfiguration;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
Expand All @@ -42,15 +43,30 @@ public class SwaggerConfig {
@Getter
private String alternateSwaggerUrl;

// default is empty
@Value("${swagger.host:}")
private String swaggerHost;

// default is empty
@Value("${swagger.basePath:}")
private String basePath;

@Bean
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(apiInfo())
.select()
.apis(basePackage("bio.overture.song.server.controller"))
.paths(any())
.build()
.pathMapping("/");
.host(swaggerHost)
.pathProvider(
new RelativePathProvider(null) {
@Override
public String getApplicationBasePath() {
return basePath;
}
}
);
}

@Bean
Expand Down
5 changes: 5 additions & 0 deletions song-server/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ management:

swagger:
alternateUrl: "/api-docs"
# host and base url are needed if you run song behind a reverse proxy
# and rewrite the url eg: http://mydomain.com/song/swagger-ui.html
# in this case host = mydomain.com, baseUrl = /song
host: ""
basePath: ""

security.basic.enabled: false

Expand Down