-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into restdocs/group-member
# Conflicts: # src/docs/asciidoc/index.adoc # src/main/java/com/postsquad/scoup/web/group/controller/GroupController.java # src/test/java/com/postsquad/scoup/web/group/GroupAcceptanceTest.java
- Loading branch information
Showing
25 changed files
with
442 additions
and
88 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
== 그룹 삭제 | ||
|
||
=== `POST /api/groups/{groupId}` | ||
|
||
=== `204 No Content` | ||
|
||
operation::group_acceptance_test/delete_group[snippets='path-parameters,http-request,http-response'] |
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,7 @@ | ||
== 그룹 이름 중복 확인 | ||
|
||
=== `GET /groups/{groupId}` | ||
|
||
=== `200 Ok` | ||
|
||
operation::group_acceptance_test/validate_group_name[snippets='request-parameters,response-fields,http-request,http-response'] |
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,7 @@ | ||
== 그룹 상세 조회 | ||
|
||
=== `GET /groups/{groupId}` | ||
|
||
=== `200 Ok` | ||
|
||
operation::group_acceptance_test/read_one[snippets='path-parameters,response-fields,http-request,http-response'] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,14 @@ | ||
package com.postsquad.scoup; | ||
|
||
import com.google.common.base.Predicates; | ||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.data.jpa.repository.config.EnableJpaAuditing; | ||
import springfox.documentation.builders.ApiInfoBuilder; | ||
import springfox.documentation.builders.PathSelectors; | ||
import springfox.documentation.service.ApiInfo; | ||
import springfox.documentation.spi.DocumentationType; | ||
import springfox.documentation.spring.web.plugins.Docket; | ||
import springfox.documentation.swagger2.annotations.EnableSwagger2; | ||
|
||
@EnableSwagger2 | ||
@EnableJpaAuditing | ||
@SpringBootApplication | ||
public class ScoupApplication { | ||
|
||
public static void main(String[] args) { | ||
SpringApplication.run(ScoupApplication.class, args); | ||
} | ||
|
||
@Bean | ||
public Docket api() { | ||
return new Docket(DocumentationType.SWAGGER_2) | ||
.groupName("Scoup") | ||
.apiInfo(apiInfo()) | ||
.select() | ||
.paths(Predicates.not(PathSelectors.regex("/error"))) | ||
.paths(PathSelectors.ant("/**")) | ||
.build(); | ||
} | ||
|
||
private ApiInfo apiInfo() { | ||
return new ApiInfoBuilder() | ||
.title("Scoup API Documentation") | ||
.version("1.0") | ||
.description("Scoup의 API 문서입니다.") | ||
.build(); | ||
} | ||
} |
49 changes: 49 additions & 0 deletions
49
src/main/java/com/postsquad/scoup/web/config/SwaggerConfig.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,49 @@ | ||
package com.postsquad.scoup.web.config; | ||
|
||
import com.google.common.base.Predicates; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.hateoas.client.LinkDiscoverer; | ||
import org.springframework.hateoas.client.LinkDiscoverers; | ||
import org.springframework.hateoas.mediatype.collectionjson.CollectionJsonLinkDiscoverer; | ||
import org.springframework.plugin.core.SimplePluginRegistry; | ||
import springfox.documentation.builders.ApiInfoBuilder; | ||
import springfox.documentation.builders.PathSelectors; | ||
import springfox.documentation.service.ApiInfo; | ||
import springfox.documentation.spi.DocumentationType; | ||
import springfox.documentation.spring.web.plugins.Docket; | ||
import springfox.documentation.swagger2.annotations.EnableSwagger2; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
@EnableSwagger2 | ||
@Configuration | ||
public class SwaggerConfig { | ||
|
||
@Bean | ||
public Docket api() { | ||
return new Docket(DocumentationType.SWAGGER_2) | ||
.groupName("Scoup") | ||
.apiInfo(apiInfo()) | ||
.select() | ||
.paths(Predicates.not(PathSelectors.regex("/error"))) | ||
.paths(PathSelectors.ant("/**")) | ||
.build(); | ||
} | ||
|
||
private ApiInfo apiInfo() { | ||
return new ApiInfoBuilder() | ||
.title("Scoup API Documentation") | ||
.version("1.0") | ||
.description("Scoup의 API 문서입니다.") | ||
.build(); | ||
} | ||
|
||
@Bean | ||
public LinkDiscoverers discoverers() { | ||
List<LinkDiscoverer> plugins = new ArrayList<>(); | ||
plugins.add(new CollectionJsonLinkDiscoverer()); | ||
return new LinkDiscoverers(SimplePluginRegistry.create(plugins)); | ||
} | ||
} |
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
18 changes: 18 additions & 0 deletions
18
src/main/java/com/postsquad/scoup/web/group/controller/request/GroupValidationRequest.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,18 @@ | ||
package com.postsquad.scoup.web.group.controller.request; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import javax.validation.constraints.NotNull; | ||
|
||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Data | ||
@Builder | ||
public class GroupValidationRequest { | ||
|
||
@NotNull | ||
private String groupName; | ||
} |
12 changes: 0 additions & 12 deletions
12
src/main/java/com/postsquad/scoup/web/group/controller/response/GroupDetailResponse.java
This file was deleted.
Oops, something went wrong.
22 changes: 22 additions & 0 deletions
22
src/main/java/com/postsquad/scoup/web/group/controller/response/GroupReadOneResponse.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,22 @@ | ||
package com.postsquad.scoup.web.group.controller.response; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
@Data | ||
// TODO: 전체조회 머지되면 BaseResponse와 합치기 | ||
public class GroupReadOneResponse { | ||
|
||
private long id; | ||
|
||
private String name; | ||
|
||
private String description; | ||
|
||
private String image; | ||
} |
7 changes: 4 additions & 3 deletions
7
src/main/java/com/postsquad/scoup/web/group/controller/response/GroupValidationResponse.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
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
20 changes: 20 additions & 0 deletions
20
src/main/java/com/postsquad/scoup/web/user/controller/request/EmailValidationRequest.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,20 @@ | ||
package com.postsquad.scoup.web.user.controller.request; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import javax.validation.constraints.Email; | ||
import javax.validation.constraints.NotEmpty; | ||
|
||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
@Data | ||
public class EmailValidationRequest { | ||
|
||
@NotEmpty | ||
private String email; | ||
} |
18 changes: 18 additions & 0 deletions
18
src/main/java/com/postsquad/scoup/web/user/controller/request/NicknameValidationRequest.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,18 @@ | ||
package com.postsquad.scoup.web.user.controller.request; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import javax.validation.constraints.NotEmpty; | ||
|
||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
@Data | ||
public class NicknameValidationRequest { | ||
|
||
@NotEmpty | ||
private String nickname; | ||
} |
Oops, something went wrong.