-
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 #67 from makevook/issue/62,64,65,66
feat, docs: bean validator 추가, API 공통 반환 형식 변경, OpenAPI 리팩토링
- Loading branch information
Showing
26 changed files
with
286 additions
and
117 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
36 changes: 36 additions & 0 deletions
36
api/src/main/java/vook/server/api/web/common/ApiResponseCode.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,36 @@ | ||
package vook.server.api.web.common; | ||
|
||
public interface ApiResponseCode { | ||
|
||
String code(); | ||
|
||
enum Ok implements ApiResponseCode { | ||
|
||
SUCCESS; | ||
|
||
@Override | ||
public String code() { | ||
return this.name(); | ||
} | ||
} | ||
|
||
enum BadRequest implements ApiResponseCode { | ||
|
||
INVALID_PARAMETER; | ||
|
||
@Override | ||
public String code() { | ||
return this.name(); | ||
} | ||
} | ||
|
||
enum ServerError implements ApiResponseCode { | ||
|
||
UNHANDLED_ERROR; | ||
|
||
@Override | ||
public String code() { | ||
return this.name(); | ||
} | ||
} | ||
} |
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
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
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
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
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
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
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
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
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
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
api/src/main/java/vook/server/api/web/routes/user/reqres/UserRegisterRequest.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
17 changes: 17 additions & 0 deletions
17
api/src/main/java/vook/server/api/web/swagger/ComponentRefConsts.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,17 @@ | ||
package vook.server.api.web.swagger; | ||
|
||
/** | ||
* OpenAPI ComponentRef 상수 | ||
*/ | ||
public class ComponentRefConsts { | ||
|
||
public static class Schema { | ||
public static final String COMMON_API_RESPONSE = "#/components/schemas/CommonApiResponse"; | ||
} | ||
|
||
public static class Example { | ||
public static final String SUCCESS = "#/components/examples/Success"; | ||
public static final String INVALID_PARAMETER = "#/components/examples/InvalidParameter"; | ||
public static final String UNHANDLED_ERROR = "#/components/examples/UnhandledError"; | ||
} | ||
} |
Oops, something went wrong.