Skip to content

Commit

Permalink
add springdoc-openapi-starter-webmvc-ui
Browse files Browse the repository at this point in the history
  • Loading branch information
liweinan committed Nov 11, 2024
1 parent 97df689 commit 8582448
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
14 changes: 10 additions & 4 deletions servlet/resteasy-wildfly-spring-boot-sample-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,17 @@
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!-- MP OpenAPI -->
<!-- <dependency>-->
<!-- <groupId>org.eclipse.microprofile.openapi</groupId>-->
<!-- <artifactId>microprofile-openapi-api</artifactId>-->
<!-- <version>${version.eclipse.microprofile.openapi}</version>-->
<!-- <scope>provided</scope>-->
<!-- </dependency>-->
<!-- springdoc ui -->
<dependency>
<groupId>org.eclipse.microprofile.openapi</groupId>
<artifactId>microprofile-openapi-api</artifactId>
<version>${version.eclipse.microprofile.openapi}</version>
<scope>provided</scope>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>2.6.0</version>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.sample.app;

import org.eclipse.microprofile.openapi.annotations.responses.APIResponse;
//import org.eclipse.microprofile.openapi.annotations.responses.APIResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

Expand All @@ -14,7 +14,7 @@ public class HelloResource {
@Autowired
EchoBean bean;

@APIResponse(description = "return hello world")
// @APIResponse(description = "return hello world")
@GET
public String get() {
return bean.echo("Hello, world!");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import jakarta.ws.rs.ApplicationPath;
import jakarta.ws.rs.core.Application;
import org.eclipse.microprofile.openapi.annotations.OpenAPIDefinition;
import org.eclipse.microprofile.openapi.annotations.info.Info;
//import org.eclipse.microprofile.openapi.annotations.OpenAPIDefinition;
//import org.eclipse.microprofile.openapi.annotations.info.Info;

@ApplicationPath("/rest")
@OpenAPIDefinition(info = @Info(title = "RestApp", version = "1.0.0"))
//@OpenAPIDefinition(info = @Info(title = "RestApp", version = "1.0.0"))
public class RestApp extends Application {
}

0 comments on commit 8582448

Please sign in to comment.