From f270cbf32194f38e3c36a7877117f6b0e6139c4a Mon Sep 17 00:00:00 2001 From: coke98 Date: Sun, 8 Jun 2025 14:58:09 +0900 Subject: [PATCH 1/3] =?UTF-8?q?refactor:=20Embedded=20Redis=20=EB=8F=84?= =?UTF-8?q?=EC=9E=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 테스트시 임베디드 레디스를 사용하도록 설정 ref: #83 --- build.gradle | 4 +++ .../global/config/EmbeddedRedisConfig.java | 30 +++++++++++++++++++ .../restdocs/AchievementRestDocsTest.java | 2 ++ src/test/resources/application.yml | 5 ++++ 4 files changed, 41 insertions(+) create mode 100644 src/test/java/com/example/bloombackend/global/config/EmbeddedRedisConfig.java diff --git a/build.gradle b/build.gradle index 5da4bbc..8742367 100644 --- a/build.gradle +++ b/build.gradle @@ -43,6 +43,10 @@ dependencies { runtimeOnly 'com.mysql:mysql-connector-j' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' testImplementation 'com.h2database:h2' + testImplementation('it.ozimov:embedded-redis:0.7.3') { + exclude group: 'org.slf4j', module: 'slf4j-simple' + exclude group: 'commons-logging', module: 'commons-logging' + } //AWS S3 implementation 'org.springframework.cloud:spring-cloud-starter-aws:2.2.6.RELEASE' diff --git a/src/test/java/com/example/bloombackend/global/config/EmbeddedRedisConfig.java b/src/test/java/com/example/bloombackend/global/config/EmbeddedRedisConfig.java new file mode 100644 index 0000000..f5d92b7 --- /dev/null +++ b/src/test/java/com/example/bloombackend/global/config/EmbeddedRedisConfig.java @@ -0,0 +1,30 @@ +package com.example.bloombackend.global.config; + +import jakarta.annotation.PostConstruct; +import jakarta.annotation.PreDestroy; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Profile; +import redis.embedded.RedisServer; + +@Configuration +@Profile("test") +public class EmbeddedRedisConfig { + + private final RedisServer redisServer; + + public EmbeddedRedisConfig( + @Value("${spring.data.redis.port}") int port) { + this.redisServer = new RedisServer(port); + } + + @PostConstruct + public void start() { + redisServer.start(); + } + + @PreDestroy + public void stop() { + redisServer.stop(); + } +} \ No newline at end of file diff --git a/src/test/java/com/example/bloombackend/restdocs/AchievementRestDocsTest.java b/src/test/java/com/example/bloombackend/restdocs/AchievementRestDocsTest.java index ced3469..e4e0532 100644 --- a/src/test/java/com/example/bloombackend/restdocs/AchievementRestDocsTest.java +++ b/src/test/java/com/example/bloombackend/restdocs/AchievementRestDocsTest.java @@ -22,6 +22,7 @@ import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.mock.mockito.SpyBean; import org.springframework.http.MediaType; +import org.springframework.test.context.ActiveProfiles; import org.springframework.test.web.servlet.MockMvc; import java.lang.reflect.Field; @@ -42,6 +43,7 @@ @AutoConfigureMockMvc @AutoConfigureRestDocs @Transactional +@ActiveProfiles("test") public class AchievementRestDocsTest { @Autowired diff --git a/src/test/resources/application.yml b/src/test/resources/application.yml index f5606d6..c8b09be 100644 --- a/src/test/resources/application.yml +++ b/src/test/resources/application.yml @@ -24,6 +24,11 @@ spring: enabled: true max-file-size: 10MB max-request-size: 10MB + data: + redis: + host: localhost + port: 6379 + timeout: 6000ms oauth: kakao: From 8c4715ba37b707156d5ecd7cf05d897a52a80a02 Mon Sep 17 00:00:00 2001 From: coke98 Date: Sun, 8 Jun 2025 15:19:00 +0900 Subject: [PATCH 2/3] =?UTF-8?q?chore:=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20ci?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gradle.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/gradle.yml diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml new file mode 100644 index 0000000..abcd6b6 --- /dev/null +++ b/.github/workflows/gradle.yml @@ -0,0 +1,18 @@ +name: Test CI + +on: + pull_request: + branches: [ develop ] # 디벨롭 브랜치로 들어오는 PR만 실행 + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '17' + - uses: gradle/gradle-build-action@v2 + with: + arguments: test From 191e2d49cc98b68f210c9a7b73391f1d771b3334 Mon Sep 17 00:00:00 2001 From: coke98 Date: Sun, 8 Jun 2025 15:44:35 +0900 Subject: [PATCH 3/3] =?UTF-8?q?ci=20=EC=9B=8C=ED=81=AC=ED=94=8C=EB=A1=9C?= =?UTF-8?q?=EC=9A=B0=20=ED=8A=B8=EB=A6=AC=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/static/docs/achievement.html | 802 --------- .../resources/static/docs/bottle-message.html | 1568 ----------------- .../resources/static/docs/daily-question.html | 650 ------- src/main/resources/static/docs/quest.html | 691 -------- src/main/resources/static/docs/test.html | 557 ------ src/main/resources/static/docs/user.html | 860 --------- 6 files changed, 5128 deletions(-) delete mode 100644 src/main/resources/static/docs/achievement.html delete mode 100644 src/main/resources/static/docs/bottle-message.html delete mode 100644 src/main/resources/static/docs/daily-question.html delete mode 100644 src/main/resources/static/docs/quest.html delete mode 100644 src/main/resources/static/docs/test.html delete mode 100644 src/main/resources/static/docs/user.html diff --git a/src/main/resources/static/docs/achievement.html b/src/main/resources/static/docs/achievement.html deleted file mode 100644 index 09ff41a..0000000 --- a/src/main/resources/static/docs/achievement.html +++ /dev/null @@ -1,802 +0,0 @@ - - - - - - - - -성취도 API - - - - - -
-
-

성취도 API

-
-
-

1. 일일 꽃 등록 API

-
-

HTTP request

-
-
-
POST /api/achievement/flower HTTP/1.1
-Content-Type: application/json;charset=UTF-8
-Authorization: jwtToken
-Content-Length: 14
-Host: localhost:8080
-
-{"flowerId":2}
-
-
-
-
-

request body

- ----- - - - - - - - - - - - - - - -
PathTypeDescription

flowerId

Number

등록할 꽃 ID

-
-
-
-

2. 오늘 등록한 꽃 조회 API

-
-

HTTP request

-
-
-
GET /api/achievement/flower HTTP/1.1
-Authorization: jwtToken
-Host: localhost:8080
-
-
-
-
-

HTTP response

-
-
-
HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 55
-
-{"flowerId":1,"iconUrl":"https://test.com/flower1.png"}
-
-
-
-
-

response body

- ----- - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

flowerId

Number

오늘의 꽃 ID

iconUrl

String

오늘의 꽃 아이콘 URL

-
- -
-
-

3. 성취도 레벨 업데이트 API

-
-

HTTP request

-
-
-
PATCH /api/achievement HTTP/1.1
-Content-Type: application/json;charset=UTF-8
-Authorization: jwtToken
-Content-Length: 16
-Host: localhost:8080
-
-{"increaseBy":1}
-
-
-
-
-

request body

- ----- - - - - - - - - - - - - - - -
PathTypeDescription

increaseBy

Number

증가 시킬 성취도 단계 값

-
-
-

HTTP response

-
-
-
HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 18
-
-{"updatedLevel":1}
-
-
-
-
-

response body

- ----- - - - - - - - - - - - - - - -
PathTypeDescription

updatedLevel

Number

업데이트된 성취도 단계

-
-
-
-

4. 월간 성취도 조회 API

-
-

HTTP request

-
-
-
GET /api/achievement/monthly?month=2024-09 HTTP/1.1
-Authorization: jwtToken
-Host: localhost:8080
-
-
-
-
-

query parameters

- ---- - - - - - - - - - - - - -
ParameterDescription

month

조회할 월 (YYYY-MM)

-
-
-

HTTP response

-
-
-
HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 339
-
-{"dailyData":[{"date":"2024-09-01","flowerIconUrl":"http://www.bloom24.kro.kr:8080/flower-icons/sprout1.svg","achievementLevel":4},{"date":"2024-09-02","flowerIconUrl":"http://www.bloom24.kro.kr:8080/flower-icons/sprout2.svg","achievementLevel":8},{"date":"2024-09-07","flowerIconUrl":"https://test.com/flower1.png","achievementLevel":9}]}
-
-
-
-
-

response body

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

dailyData[]

Array

일별 데이터

dailyData[].date

String

날짜

dailyData[].flowerIconUrl

String

설정한 꽃 아이콘 URL

dailyData[].achievementLevel

Number

성취 단계

-
-
-
-

5. 6개월 성취도 조회 API

-
-

HTTP request

-
-
-
GET /api/achievement/recent-six-months HTTP/1.1
-Authorization: jwtToken
-Host: localhost:8080
-
-
-
-
-

HTTP response

-
-
-
HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 141
-
-{"monthlyData":[{"month":202407,"bloomed":10},{"month":202408,"bloomed":15},{"month":202409,"bloomed":1}],"averageBloomed":8.666666666666666}
-
-
-
-
-

response body

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

monthlyData[]

Array

월별 데이터

monthlyData[].month

Number

조회된 월

monthlyData[].bloomed

Number

꽃이 핀 횟수

averageBloomed

Number

평균 꽃이 핀 횟수

-
-
-
-
-
- - - \ No newline at end of file diff --git a/src/main/resources/static/docs/bottle-message.html b/src/main/resources/static/docs/bottle-message.html deleted file mode 100644 index 21c96b9..0000000 --- a/src/main/resources/static/docs/bottle-message.html +++ /dev/null @@ -1,1568 +0,0 @@ - - - - - - - - -API 문서 - - - - - - - -
-
-

유리병 메시지 API

-
-
-

1. 유리병 메시지 등록

-
-

HTTP request

-
-
-
POST /api/bottle-messages HTTP/1.1
-Content-Type: application/json;charset=UTF-8
-Authorization: jwtToken
-Content-Length: 171
-Host: localhost:8080
-
-{"title":"힘든하루였지만","content":"보람차","postCard":"https://bloom-bucket-8430.s3.ap-northeast-2.amazonaws.com/postCard/KakaoTalk_20240919_002957024_01.jpg"}
-
-
-
-
-

request body

- ----- - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

title

String

등록할 유리병 메시지 제목

content

String

등록할 유리병 메시지 내용

postCard

String

선택한 편지지 url

-
-
-

HTTP response

-
-
-
HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 179
-
-{"id":5,"analysis":{"emotions":[{"emotion":"만족감","percentage":80},{"emotion":"성취감","percentage":75},{"emotion":"자부심","percentage":70}],"negativeImpact":"LOWER"}}
-
-
-
-
-

response body

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

id

Number

등록한 유리병 메시지 아이디

analysis

Object

등록한 유리병 메시지의 분석 결과

analysis.emotions[]

Array

분석 결과의 감정 정보 리스트

analysis.emotions[].emotion

String

분석된 감정

analysis.emotions[].percentage

Number

해당감정의 퍼센트

analysis.negativeImpact

String

위험성 (UPPER,MIDDLE,LOWER)

-
-
-
-

2. 유리병 메시지 랜덤조회

-
-

HTTP request

-
-
-
GET /api/bottle-messages/random HTTP/1.1
-Content-Type: application/json;charset=UTF-8
-Authorization: jwtToken
-Host: localhost:8080
-
-
-
-
-

HTTP response

-
-
-
HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 458
-
-{"message":{"messageId":1,"title":"작은 한 걸음이 큰 변화를 만듭니다!","content":"비록 지금은 느리게 가는 것처럼 보여도, 그 작은 한 걸음 한 걸음이 결국 큰 변화를 만들 것입니다. 끝까지 함께 갑시다!","postCardUrl":"https://bloom-bucket-8430.s3.ap-northeast-2.amazonaws.com/postCard/KakaoTalk_20240919_002957024.jpg","negativity":"LOWER"},"reaction":{"isReacted":false,"like":0,"empathy":0,"cheer":0}}
-
-
-
-
-

response body

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

message

Object

유리병 메시지 정보

message.messageId

Number

유리병 메시지 아이디

message.title

String

유리병 메시지 제목

message.content

String

유리병 메시지 내용

message.postCardUrl

String

유리병 메시지 편지지 Url

message.negativity

String

유리병 메시지 위험도

reaction

Object

유리병 메시지 반응 정보

reaction.isReacted

Boolean

해당 유리병 메시지 유저 반응 여부

reaction.like

Number

유리병 메시지 좋아요 개수

reaction.empathy

Number

유리병 메시지 공감해요 개수

reaction.cheer

Number

유리병 메시지 응원해요 개수

-
-
-
-

3. 받은 유리병 메시지 목록 조회

-
-

HTTP request

-
-
-
GET /api/bottle-messages HTTP/1.1
-Content-Type: application/json;charset=UTF-8
-Authorization: jwtToken
-Host: localhost:8080
-
-
-
-
-

HTTP response

-
-
-
HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 583
-
-{"bottleMessageResponses":[{"log":{"receivedAt":"2024-09-24 00:31:22","sentAt":"2024-09-24 00:31:22"},"messages":{"messageId":21,"title":"내일은 또 다른날","postCardUrl":"https://bloom-bucket-8430.s3.ap-northeast-2.amazonaws.com/postCard/KakaoTalk_20240919_002957024_01.jpg","negativity":"LOWER"}},{"log":{"receivedAt":"2024-09-24 00:31:22","sentAt":"2024-09-24 00:31:22"},"messages":{"messageId":22,"title":"모두모두 화이팅","postCardUrl":"https://bloom-bucket-8430.s3.ap-northeast-2.amazonaws.com/postCard/KakaoTalk_20240919_002957024_01.jpg","negativity":"LOWER"}}]}
-
-
-
-
-

response body

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

bottleMessageResponses[]

Array

유리병 메시지 목록

bottleMessageResponses[].log

Object

유리병 메시지 수발신 로그 정보

bottleMessageResponses[].log.receivedAt

String

수신일시

bottleMessageResponses[].log.sentAt

String

발신일시

bottleMessageResponses[].messages

Object

메시지 정보

bottleMessageResponses[].messages.messageId

Number

유리병 메시지 아이디

bottleMessageResponses[].messages.title

String

유리병 메시지 제목

bottleMessageResponses[].messages.postCardUrl

String

유리병 메시지 편지지 url

bottleMessageResponses[].messages.negativity

String

유리병 메시지 위험도

-
-
-
-

4. 유리병 메시지 상세조회

-
-

HTTP request

-
-
-
GET /api/bottle-messages/10 HTTP/1.1
-Content-Type: application/json;charset=UTF-8
-Authorization: jwtToken
-Host: localhost:8080
-
-
-
-
-

path parameter

- ---- - - - - - - - - - - - - -
ParameterDescription

messageId

조회할 메시지 아이디

-
-
-

HTTP response

-
-
-
HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 316
-
-{"message":{"messageId":10,"title":"내일은 또 다른날","content":"오늘은 금요일 내일은 토요일","postCardUrl":"https://bloom-bucket-8430.s3.ap-northeast-2.amazonaws.com/postCard/KakaoTalk_20240919_002957024_01.jpg","negativity":"LOWER"},"reaction":{"isReacted":false,"like":0,"empathy":0,"cheer":0}}
-
-
-
-
-

response body

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

message

Object

유리병 메시지 정보

message.messageId

Number

유리병 메시지 아이디

message.title

String

유리병 메시지 제목

message.content

String

유리병 메시지 내용

message.postCardUrl

String

유리병 메시지 편지지 Url

message.negativity

String

유리병 메시지 위험도

reaction

Object

유리병 메시지 반응 정보

reaction.isReacted

Boolean

해당 유리병 메시지 유저 반응 여부

reaction.like

Number

유리병 메시지 좋아요 개수

reaction.empathy

Number

유리병 메시지 공감해요 개수

reaction.cheer

Number

유리병 메시지 응원해요 개수

-
-
-
-

5. 받은 유리병 메시지 삭제

-
-

HTTP request

-
-
-
POST /api/bottle-messages/17/delete HTTP/1.1
-Content-Type: application/json;charset=UTF-8
-Authorization: jwtToken
-Host: localhost:8080
-
-
-
-
-

path parameter

- ---- - - - - - - - - - - - - -
ParameterDescription

messageId

삭제할 메시지 아이디

-
-
-

HTTP response

-
-
-
HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 305
-
-{"bottleMessageResponses":[{"log":{"receivedAt":"2024-09-24 00:31:22","sentAt":"2024-09-24 00:31:22"},"messages":{"messageId":18,"title":"모두모두 화이팅","postCardUrl":"https://bloom-bucket-8430.s3.ap-northeast-2.amazonaws.com/postCard/KakaoTalk_20240919_002957024_01.jpg","negativity":"LOWER"}}]}
-
-
-
-
-

response body

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

bottleMessageResponses[]

Array

유리병 메시지 목록

bottleMessageResponses[].log

Object

유리병 메시지 수발신 로그 정보

bottleMessageResponses[].log.receivedAt

String

수신일시

bottleMessageResponses[].log.sentAt

String

발신일시

bottleMessageResponses[].messages

Object

메시지 정보

bottleMessageResponses[].messages.messageId

Number

유리병 메시지 아이디

bottleMessageResponses[].messages.title

String

유리병 메시지 제목

bottleMessageResponses[].messages.postCardUrl

String

유리병 메시지 편지지 url

bottleMessageResponses[].messages.negativity

String

유리병 메시지 위험도

-
-
-
-

6. 보낸 유리병 메시지 목록 조회

-
-

HTTP request

-
-
-
GET /api/bottle-messages/sent HTTP/1.1
-Content-Type: application/json;charset=UTF-8
-Authorization: jwtToken
-Host: localhost:8080
-
-
-
-
-

HTTP response

-
-
-
HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 461
-
-{"messages":[{"sentAt":"2024-09-24","message":{"messageId":8,"title":"내일은 또 다른날","postCardUrl":"https://bloom-bucket-8430.s3.ap-northeast-2.amazonaws.com/postCard/KakaoTalk_20240919_002957024_01.jpg","negativity":"LOWER"}},{"sentAt":"2024-09-24","message":{"messageId":9,"title":"다 죽어버렸으면","postCardUrl":"https://bloom-bucket-8430.s3.ap-northeast-2.amazonaws.com/postCard/KakaoTalk_20240919_002957024_01.jpg","negativity":"UPPER"}}]}
-
-
-
-
-

response body

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

messages[]

Array

유리병 메시지 목록

messages[].sentAt

String

보낸 시간

messages[].message.messageId

Number

유리병 메시지 아이디

messages[].message.title

String

유리병 메시지 제목

messages[].message.postCardUrl

String

유리병 메시지 편지지

messages[].message.negativity

String

유리병 메시지 위험도

-
-
-
-

7. 유리병 메시지 반응 등록

-
-

HTTP request

-
-
-
POST /api/bottle-messages/19/react HTTP/1.1
-Content-Type: application/json;charset=UTF-8
-Authorization: jwtToken
-Content-Length: 19
-Host: localhost:8080
-
-{"reaction":"LIKE"}
-
-
-
-
-

path parameter

- ---- - - - - - - - - - - - - -
ParameterDescription

messageId

조회할 메시지 아이디

-
-
-

request body

- ----- - - - - - - - - - - - - - - -
PathTypeDescription

reaction

String

등록할 반응 (LIKE,CHEER,EMPATHY)

-
-
-

HTTP response

-
-
-
HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 49
-
-{"isReacted":true,"like":1,"empathy":0,"cheer":0}
-
-
-
-
-

response body

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

isReacted

Boolean

유저의 반응여부

like

Number

좋아요 개수

empathy

Number

공감해요 개수

cheer

Number

응원해요 개수

-
-
-
-

8. 유리병 메시지 반응 삭제

-
-

HTTP request

-
-
-
DELETE /api/bottle-messages/12/react HTTP/1.1
-Content-Type: application/json;charset=UTF-8
-Authorization: jwtToken
-Content-Length: 19
-Host: localhost:8080
-
-{"reaction":"LIKE"}
-
-
-
-
-

path parameter

- ---- - - - - - - - - - - - - -
ParameterDescription

messageId

반응을 삭제할 메시지 아이디

-
-
-

request body

- ----- - - - - - - - - - - - - - - -
PathTypeDescription

reaction

String

삭제할 반응(LIKE,EMPATHY,CHEER)

-
-
-

HTTP response

-
-
-
HTTP/1.1 200 OK
-
-
-
-
-
-

9. 유리병 메시지 최근 전송 시간 조회

-
-

HTTP request

-
-
-
GET /api/bottle-messages/recent-send-time HTTP/1.1
-Content-Type: application/json;charset=UTF-8
-Authorization: jwtToken
-Host: localhost:8080
-
-
-
-
-

HTTP response

-
-
-
HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 32
-
-{"sentAt":"2024-09-24 00:31:22"}
-
-
-
-
-

response body

- ----- - - - - - - - - - - - - - - -
PathTypeDescription

sentAt

String

최근 전송한 시간

-
-
-
-
-
- - - - - - \ No newline at end of file diff --git a/src/main/resources/static/docs/daily-question.html b/src/main/resources/static/docs/daily-question.html deleted file mode 100644 index 50b4c9b..0000000 --- a/src/main/resources/static/docs/daily-question.html +++ /dev/null @@ -1,650 +0,0 @@ - - - - - - - - -API 문서 - - - - - -
-
-

오늘의 질문 API

-
-
-

1. 오늘의 질문 조회 API

-
-

HTTP request

-
-
-
GET /api/daily-question HTTP/1.1
-Content-Type: application/json;charset=UTF-8
-Authorization: jwtToken
-Host: localhost:8080
-
-
-
-
-

HTTP response

-
-
-
HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 32
-
-{"question":"오늘의 질문1"}
-
-
-
-
-

response body

- ----- - - - - - - - - - - - - - - -
PathTypeDescription

question

String

오늘의 질문

-
-
-
-

2. 특정 날짜의 오늘의 질문 답변 조회 API

-
-

HTTP request

-
-
-
GET /api/daily-question/answer?date=2024-09-01 HTTP/1.1
-Content-Type: application/json;charset=UTF-8
-Authorization: jwtToken
-Host: localhost:8080
-
-
-
-
-

request parameters

- ---- - - - - - - - - - - - - -
ParameterDescription

date

조회할 날짜 (YYYY-MM-DD 형식)

-
-
-

HTTP response

-
-
-
HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 60
-
-{"question":"오늘의 질문2","answer":"테스트 답변"}
-
-
-
-
-

response body

- ----- - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

question

String

해당 날짜의 질문

answer

String

사용자의 답변

-
-
-
-

3. 오늘의 질문 답변 수정 API

-
-

HTTP request

-
-
-
PUT /api/daily-question/answer HTTP/1.1
-Content-Type: application/json;charset=UTF-8
-Authorization: jwtToken
-Content-Length: 29
-Host: localhost:8080
-
-{"answer":"수정할 답변"}
-
-
-
-
-

request body

- ----- - - - - - - - - - - - - - - -
PathTypeDescription

answer

String

수정할 답변

-
-
-

HTTP response

-
-
-
HTTP/1.1 200 OK
-
-
-
-
-
-
-
- - - \ No newline at end of file diff --git a/src/main/resources/static/docs/quest.html b/src/main/resources/static/docs/quest.html deleted file mode 100644 index 9c4ffae..0000000 --- a/src/main/resources/static/docs/quest.html +++ /dev/null @@ -1,691 +0,0 @@ - - - - - - - - -API 문서 - - - - - -
-
-

퀘스트 API

-
-
-

1. 사용 가능한 퀘스트 목록 조회 API

-
-

HTTP request

-
-
-
GET /api/quests/available HTTP/1.1
-Content-Type: application/json;charset=UTF-8
-Host: localhost:8080
-
-
-
-
-

HTTP response

-
-
-
HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 525
-
-{"quests":[{"id":1,"iconUrl":"https://test.com/icon1.png","title":"물 마시기","maxCount":10},{"id":2,"iconUrl":"https://test.com/icon2.png","title":"산책 하기","maxCount":1},{"id":3,"iconUrl":"https://test.com/icon1.png","title":"물 마시기","maxCount":10},{"id":4,"iconUrl":"https://test.com/icon2.png","title":"산책 하기","maxCount":1},{"id":5,"iconUrl":"https://test.com/icon1.png","title":"물 마시기","maxCount":10},{"id":6,"iconUrl":"https://test.com/icon2.png","title":"산책 하기","maxCount":1}]}
-
-
-
-
-

response body

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

quests[]

Array

사용 가능한 퀘스트 목록

quests[].id

Number

퀘스트 ID

quests[].title

String

퀘스트 제목

quests[].iconUrl

String

퀘스트 아이콘 URL

quests[].maxCount

Number

퀘스트 최대 수행 횟수

-
-
-
-

2. 오늘의 퀘스트 등록 API

-
-

HTTP request

-
-
-
POST /api/quests HTTP/1.1
-Content-Type: application/json;charset=UTF-8
-Authorization: jwtToken
-Content-Length: 18
-Host: localhost:8080
-
-{"questIds":[1,2]}
-
-
-
-
-

request body

- ----- - - - - - - - - - - - - - - -
PathTypeDescription

questIds

Array

등록할 퀘스트 ID 목록

-
-
-

HTTP response

-
-
-
HTTP/1.1 200 OK
-
-
-
-
-
-

3. 사용자가 등록한 오늘의 퀘스트 목록 조회 API

-
-

HTTP request

-
-
-
GET /api/quests/registered HTTP/1.1
-Content-Type: application/json;charset=UTF-8
-Authorization: jwtToken
-Host: localhost:8080
-
-
-
-
-

HTTP response

-
-
-
HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 213
-
-{"quests":[{"id":3,"iconUrl":"https://test.com/icon1.png","title":"물 마시기","maxCount":10,"isDone":false},{"id":4,"iconUrl":"https://test.com/icon2.png","title":"산책 하기","maxCount":1,"isDone":false}]}
-
-
-
-
-

response body

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

quests[]

Array

등록한 퀘스트 목록

quests[].id

Number

퀘스트 ID

quests[].title

String

퀘스트 제목

quests[].iconUrl

String

퀘스트 아이콘 URL

quests[].maxCount

Number

퀘스트 최대 수행 횟수

quests[].isDone

Boolean

퀘스트 완료 여부

-
-
-
-

4. 퀘스트 등록 해제 API

-
-

HTTP request

-
-
-
DELETE /api/quests/1 HTTP/1.1
-Content-Type: application/json;charset=UTF-8
-Authorization: jwtToken
-Host: localhost:8080
-
-
-
-
-

HTTP response

-
-
-
HTTP/1.1 200 OK
-
-
-
-
-
-
-
- - - \ No newline at end of file diff --git a/src/main/resources/static/docs/test.html b/src/main/resources/static/docs/test.html deleted file mode 100644 index ef287a1..0000000 --- a/src/main/resources/static/docs/test.html +++ /dev/null @@ -1,557 +0,0 @@ - - - - - - - - -API 문서 - - - - - -
-
-

테스트 API

-
-
-

HTTP request

-
-
-
POST /api/test/users HTTP/1.1
-Content-Type: application/json;charset=UTF-8
-Content-Length: 25
-Host: localhost:8080
-
-{"name":"bloom","age":25}
-
-
-
-

request body

- ----- - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

name

String

사용자의 이름

age

Number

사용자의 나이

-
-
-
-

HTTP response

-
-
-
HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 25
-
-{"name":"bloom","age":25}
-
-
-
-

response body

- ----- - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

name

String

사용자의 이름

age

Number

사용자의 나이

-
-
-
-
-
- - - \ No newline at end of file diff --git a/src/main/resources/static/docs/user.html b/src/main/resources/static/docs/user.html deleted file mode 100644 index e717b21..0000000 --- a/src/main/resources/static/docs/user.html +++ /dev/null @@ -1,860 +0,0 @@ - - - - - - - - -API 문서 - - - - - - - -
-
-

유저 API

-
-
-

1. 유저 정보 업데이트

-
-

HTTP request

-
-
-
PUT /api/user HTTP/1.1
-Content-Type: application/json;charset=UTF-8
-Authorization: jwtToken
-Content-Length: 72
-Host: localhost:8080
-
-{"nickname":"원지","age":"FROM_18_TO_24","gender":"F","isSurvey":true}
-
-
-
-
-

request body

-
-
-
{"nickname":"원지","age":"FROM_18_TO_24","gender":"F","isSurvey":true}
-
-
-
-
-

HTTP response

-
-
-
HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 72
-
-{"nickname":"원지","age":"FROM_18_TO_24","gender":"F","isSurvey":true}
-
-
-
-
-

response body

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

nickname

String

변경할 유저의 닉네임

age

String

유저의 나잇대

gender

String

유저의 성별

isSurvey

Boolean

유저의 설문 완료 여부

-
-
-
-

2. 유저 정보 조회

-
-

HTTP request

-
-
-
GET /api/user HTTP/1.1
-Content-Type: application/json;charset=UTF-8
-Authorization: jwtToken
-Host: localhost:8080
-
-
-
-
-

HTTP response

-
-
-
HTTP/1.1 200 OK
-Content-Type: application/json
-Content-Length: 72
-
-{"nickname":"원지","age":"FROM_18_TO_24","gender":"F","isSurvey":true}
-
-
-
-
-

response body

- ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PathTypeDescription

nickname

String

변경할 유저의 닉네임

age

String

유저의 나잇대

gender

String

유저의 성별

isSurvey

Boolean

유저의 설문 완료 여부

-
-
-
-
-
- - - - - - \ No newline at end of file