Skip to content

Commit 28939d6

Browse files
committed
fixup! Replace generated server URL in Swagger UI
1 parent e7ed9ff commit 28939d6

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,11 @@
199199
<artifactId>micrometer-registry-prometheus</artifactId>
200200
<scope>runtime</scope>
201201
</dependency>
202+
<dependency>
203+
<groupId>io.swagger.core.v3</groupId>
204+
<artifactId>swagger-annotations</artifactId>
205+
<version>2.2.20</version>
206+
</dependency>
202207
</dependencies>
203208
<build>
204209
<!-- read properties from the pom file and add them to the application.properties -->

src/main/java/org/phoebus/channelfinder/Application.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import java.util.logging.Logger;
2222

2323
import io.swagger.v3.oas.annotations.OpenAPIDefinition;
24+
import io.swagger.v3.oas.annotations.Server;
2425
import org.phoebus.channelfinder.example.PopulateService;
2526
import org.phoebus.channelfinder.processors.ChannelProcessor;
2627
import org.springframework.beans.factory.annotation.Autowired;
@@ -40,7 +41,9 @@
4041
@ComponentScan(basePackages="org.phoebus.channelfinder")
4142
@EnableScheduling
4243
@OpenAPIDefinition(
43-
servers = arrayOf(Server(url = "/"))
44+
servers = {
45+
@Server(url = "/")
46+
}
4447
)
4548
@SpringBootApplication
4649
public class Application implements ApplicationRunner {

0 commit comments

Comments
 (0)