Skip to content

Commit

Permalink
Merge pull request #104 from GGHDMS/feature/70-swagger-ui
Browse files Browse the repository at this point in the history
[고도화] Swagger UI 로 API 문서화하기
  • Loading branch information
GGHDMS authored May 27, 2023
2 parents 4b89dc1 + a64bf6c commit c1ac877
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/dataSources.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/sqldialects.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions project-board/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity5'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
implementation 'org.springdoc:springdoc-openapi-ui:1.6.12'
implementation 'org.springdoc:springdoc-openapi-data-rest:1.6.12'
implementation 'org.springdoc:springdoc-openapi-javadoc:1.6.12'


//querydsl 추가
implementation "com.querydsl:querydsl-jpa:${queryDslVersion}"
Expand All @@ -47,6 +51,8 @@ dependencies {
runtimeOnly 'com.mysql:mysql-connector-j'
runtimeOnly 'org.mariadb.jdbc:mariadb-java-client'
runtimeOnly 'org.postgresql:postgresql'
annotationProcessor 'com.github.therapi:therapi-runtime-javadoc-scribe:0.15.0'

compileOnly 'org.projectlombok:lombok'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
annotationProcessor 'org.projectlombok:lombok'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
package com.study.projectboard.controller;

import com.study.projectboard.dto.response.ArticleCommentResponse;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDateTime;

/**
* <p>
* 메인 컨트롤러
*
* <p>
* 테스트 중입니다.
*/
@Controller
public class MainController {

Expand All @@ -11,4 +23,23 @@ public String root(){
return "forward:/articles";
}

/**
* 댓글 정보를 열람한다
*
* @param id 댓글 ID
* @return 댓글 응답
*/
@ResponseBody
@GetMapping("/test-rest")
public ArticleCommentResponse test(Long id) {
return ArticleCommentResponse.of(
id,
"content",
LocalDateTime.now(),
"e@email.com",
"nickname",
"hsm"
);
}

}

0 comments on commit c1ac877

Please sign in to comment.