-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #57 from tukcomCD2024/SNOW-172-feat#51/Swagger
Snow 172 feat#51/swagger
- Loading branch information
Showing
18 changed files
with
406 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
backend/memetory/src/main/java/com/example/memetory/domain/like/controller/LikeApi.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package com.example.memetory.domain.like.controller; | ||
|
||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.Parameter; | ||
import io.swagger.v3.oas.annotations.enums.ParameterIn; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponse; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponses; | ||
import io.swagger.v3.oas.annotations.security.SecurityRequirement; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import org.springframework.http.ResponseEntity; | ||
|
||
@Tag(name = "Like") | ||
public interface LikeApi { | ||
|
||
@Operation( | ||
summary = "meme`s 좋아요 등록", | ||
description = "공유된 meme`s 게시물에 좋아요를 등록한다.", | ||
security = {@SecurityRequirement(name = "access_token")} | ||
) | ||
@ApiResponses(value = { | ||
@ApiResponse( | ||
responseCode = "201", | ||
description = "좋아요 등록!" | ||
) | ||
}) | ||
ResponseEntity<String> register( | ||
@Parameter(hidden = true) String email, | ||
@Parameter(in = ParameterIn.PATH, description = "밈스 아이디", required = true) | ||
Long memesId | ||
); | ||
|
||
@Operation( | ||
summary = "meme`s 좋아요 취소", | ||
description = "공유된 meme`s 게시물에 등록된 좋아요를 취소한다.", | ||
security = {@SecurityRequirement(name = "access_token")} | ||
) | ||
@ApiResponses(value = { | ||
@ApiResponse( | ||
responseCode = "200", | ||
description = "좋아요 취소!" | ||
) | ||
}) | ||
ResponseEntity<String> cancel( | ||
@Parameter(hidden = true) String email, | ||
@Parameter(in = ParameterIn.PATH, description = "밈스 아이디", required = true) | ||
Long memesId | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
backend/memetory/src/main/java/com/example/memetory/domain/member/controller/MemberApi.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package com.example.memetory.domain.member.controller; | ||
|
||
import com.example.memetory.domain.member.dto.MemberSignUpRequest; | ||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.Parameter; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponse; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponses; | ||
import io.swagger.v3.oas.annotations.security.SecurityRequirement; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import org.springframework.http.HttpStatus; | ||
import org.springframework.http.ResponseEntity; | ||
|
||
@Tag(name = "Member") | ||
public interface MemberApi { | ||
|
||
@Operation( | ||
summary = "회원가입", | ||
description = "첫 소셜로그인 후 추가 정보 기입", | ||
security = {@SecurityRequirement(name = "access_token")} | ||
) | ||
@ApiResponses(value = { | ||
@ApiResponse( | ||
responseCode = "200", | ||
description = "회원가입 성공!" | ||
) | ||
}) | ||
ResponseEntity<HttpStatus> register( | ||
MemberSignUpRequest memberSignUpRequest, | ||
@Parameter(hidden = true) String email | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
...nd/memetory/src/main/java/com/example/memetory/domain/member/dto/MemberSignUpRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 78 additions & 0 deletions
78
backend/memetory/src/main/java/com/example/memetory/domain/meme/controller/MemeApi.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
package com.example.memetory.domain.meme.controller; | ||
|
||
import com.example.memetory.domain.meme.dto.*; | ||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.Parameter; | ||
import io.swagger.v3.oas.annotations.enums.ParameterIn; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponse; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponses; | ||
import io.swagger.v3.oas.annotations.security.SecurityRequirement; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import org.springframework.http.HttpStatus; | ||
import org.springframework.http.ResponseEntity; | ||
|
||
@Tag(name = "Meme") | ||
public interface MemeApi { | ||
|
||
@Operation( | ||
summary = "밈 생성 콜백", | ||
description = "밈 최종 생성 후 웹 훅을 받을 api" | ||
) | ||
@ApiResponses(value = { | ||
@ApiResponse( | ||
responseCode = "200", | ||
description = "콜백 성공!" | ||
) | ||
}) | ||
ResponseEntity<HttpStatus> callBackMeme( | ||
@Parameter(in = ParameterIn.PATH, description = "멤버 아이디", required = true) Long memberId, | ||
ShotStackCallBackRequest shotStackCallBackRequest | ||
); | ||
|
||
@Operation( | ||
summary = "밈 생성", | ||
description = "템플릿, 이미지, 목소리, 대사를 입력 하고 밈을 생성한다.", | ||
security = {@SecurityRequirement(name = "access_token")} | ||
) | ||
@ApiResponses(value = { | ||
@ApiResponse( | ||
responseCode = "201", | ||
description = "밈 생성" | ||
) | ||
}) | ||
ResponseEntity<HttpStatus> register( | ||
@Parameter(hidden = true) String email, | ||
GenerateMemeListRequest generateMemeListRequest | ||
); | ||
|
||
@Operation( | ||
summary = "밈 단일 조회", | ||
description = "밈 아이디에 해당하는 밈을 조회한다.", | ||
security = {@SecurityRequirement(name = "access_token")} | ||
) | ||
@ApiResponses(value = { | ||
@ApiResponse( | ||
responseCode = "200", | ||
description = "밈 단일 조회" | ||
) | ||
}) | ||
ResponseEntity<MemeResponse> findMeme( | ||
@Parameter(hidden = true) String email, | ||
@Parameter(in = ParameterIn.PATH, description = "밈 아이디", required = true) Long memeId | ||
); | ||
|
||
@Operation( | ||
summary = "밈 전체 조회", | ||
description = "회원이 생성한 밈을 전체 조회한다.", | ||
security = {@SecurityRequirement(name = "access_token")} | ||
) | ||
@ApiResponses(value = { | ||
@ApiResponse( | ||
responseCode = "200", | ||
description = "밈 전체 조회" | ||
) | ||
}) | ||
ResponseEntity<MemeListResponse> findMemeList( | ||
@Parameter(hidden = true) String email | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.