diff --git a/src/docs/asciidoc/Grid-API.adoc b/src/docs/asciidoc/Grid-API.adoc new file mode 100644 index 0000000..67930f2 --- /dev/null +++ b/src/docs/asciidoc/Grid-API.adoc @@ -0,0 +1,14 @@ +[[Grid-API]] +== Grid-API + +[[Grid-정보-조회]] +=== Grid 정보 조회 +operation::grid-controller-test/그리드_조회[snippets='http-request,request-headers,http-response,response-fields'] + +--- + +[[Stamp-정보-조회]] +=== Stamp 정보 조회 +operation::grid-controller-test/스탬프_조회[snippets='http-request,request-headers,http-response,response-fields'] + +--- diff --git a/src/docs/asciidoc/index.adoc b/src/docs/asciidoc/index.adoc index baf25e6..e1f851d 100644 --- a/src/docs/asciidoc/index.adoc +++ b/src/docs/asciidoc/index.adoc @@ -20,4 +20,6 @@ include::Comment-API.adoc[] include::Album-API.adoc[] -include::FuneralShop-API.adoc[] \ No newline at end of file +include::FuneralShop-API.adoc[] + +include::Grid-API.adoc[] \ No newline at end of file diff --git a/src/main/java/com/kusitms/samsion/domain/comment/application/mapper/CommentMapper.java b/src/main/java/com/kusitms/samsion/domain/comment/application/mapper/CommentMapper.java index 176a5a5..3384b11 100644 --- a/src/main/java/com/kusitms/samsion/domain/comment/application/mapper/CommentMapper.java +++ b/src/main/java/com/kusitms/samsion/domain/comment/application/mapper/CommentMapper.java @@ -37,7 +37,7 @@ public static CommentInfoResponse mapToCommentInfoResponse(Comment comment, User .commentId(comment.getId()) .description(comment.getDescription()) .writer(writer.getNickname()) - .writerProfileImageUrl(writer.getMypet().getPetImageUrl()) + .writerProfileImageUrl(writer.getProfileImageUrl()) .deleted(comment.isDeleted()) .changeable(Objects.equals(writer.getId(), accessUser.getId())) .build(); diff --git a/src/main/java/com/kusitms/samsion/domain/comment/application/service/CommentReadUseCase.java b/src/main/java/com/kusitms/samsion/domain/comment/application/service/CommentReadUseCase.java index fefbf30..00f7096 100644 --- a/src/main/java/com/kusitms/samsion/domain/comment/application/service/CommentReadUseCase.java +++ b/src/main/java/com/kusitms/samsion/domain/comment/application/service/CommentReadUseCase.java @@ -46,7 +46,9 @@ private SliceResponse getSliceResponseAboutCommentInfoRespo commentInfoResponseMap.put(commentInfoResponse.getCommentId(), commentInfoResponse); if (comment.getParent() != null) { CommentInfoResponse parentInfoResponse = commentInfoResponseMap.get(comment.getParent().getId()); - parentInfoResponse.setChild(new ArrayList<>()); + if (parentInfoResponse.getChild() == null) { + parentInfoResponse.setChild(new ArrayList<>()); + } parentInfoResponse.getChild().add(commentInfoResponse); } else { commentInfoResponseList.add(commentInfoResponse); diff --git a/src/main/resources/static/docs/Album-API.html b/src/main/resources/static/docs/Album-API.html index de27699..c2511ae 100644 --- a/src/main/resources/static/docs/Album-API.html +++ b/src/main/resources/static/docs/Album-API.html @@ -1540,7 +1540,7 @@

Response fields

diff --git a/src/main/resources/static/docs/Comment-API.html b/src/main/resources/static/docs/Comment-API.html index c3833cf..a155a9d 100644 --- a/src/main/resources/static/docs/Comment-API.html +++ b/src/main/resources/static/docs/Comment-API.html @@ -1292,7 +1292,7 @@

Response fields

diff --git a/src/main/resources/static/docs/Empathy-API.html b/src/main/resources/static/docs/Empathy-API.html index d565246..68f0616 100644 --- a/src/main/resources/static/docs/Empathy-API.html +++ b/src/main/resources/static/docs/Empathy-API.html @@ -605,7 +605,7 @@

Response fields

diff --git a/src/main/resources/static/docs/Enum.html b/src/main/resources/static/docs/Enum.html index 6f090db..08c410c 100644 --- a/src/main/resources/static/docs/Enum.html +++ b/src/main/resources/static/docs/Enum.html @@ -579,7 +579,7 @@

공개여부

diff --git a/src/main/resources/static/docs/FuneralShop-API.html b/src/main/resources/static/docs/FuneralShop-API.html index 8a98819..36a2928 100644 --- a/src/main/resources/static/docs/FuneralShop-API.html +++ b/src/main/resources/static/docs/FuneralShop-API.html @@ -620,7 +620,7 @@

Response fields

diff --git a/src/main/resources/static/docs/Grid-API.html b/src/main/resources/static/docs/Grid-API.html new file mode 100644 index 0000000..02d482f --- /dev/null +++ b/src/main/resources/static/docs/Grid-API.html @@ -0,0 +1,635 @@ + + + + + + + +Grid-API + + + + + +
+
+

Grid-API

+
+
+

Grid 정보 조회

+
+

HTTP request

+
+
+
GET /grid HTTP/1.1
+Content-Type: application/json;charset=UTF-8
+Authorization: access token
+Host: localhost:8080
+
+
+
+
+

Request headers

+ ++++ + + + + + + + + + + + + +
NameDescription

Authorization

access token

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Type: application/json;charset=UTF-8
+Content-Length: 252
+
+{
+  "gridCheckList" : [ {
+    "gridNum" : 1,
+    "check" : true
+  }, {
+    "gridNum" : 2,
+    "check" : true
+  }, {
+    "gridNum" : 3,
+    "check" : true
+  }, {
+    "gridNum" : 4,
+    "check" : true
+  } ],
+  "gridImageUrl" : "imageurl"
+}
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

gridCheckList[].check

Boolean

그리드 체크 여부

gridCheckList[].gridNum

Number

그리드 번호

gridImageUrl

String

그리드 이미지 링크

+
+
+
+
+

Stamp 정보 조회

+
+

HTTP request

+
+
+
GET /grid/stamp HTTP/1.1
+Content-Type: application/json;charset=UTF-8
+Authorization: access token
+Host: localhost:8080
+
+
+
+
+

Request headers

+ ++++ + + + + + + + + + + + + +
NameDescription

Authorization

access token

+
+
+

HTTP response

+
+
+
HTTP/1.1 200 OK
+Content-Type: application/json;charset=UTF-8
+Content-Length: 79
+
+{
+  "content" : [ {
+    "stampId" : 1,
+    "imageUrl" : "imageurl"
+  } ]
+}
+
+
+
+
+

Response fields

+ +++++ + + + + + + + + + + + + + + + + + + + +
PathTypeDescription

content[].stampId

Number

스탬프 아이디

content[].imageUrl

String

스탬프 이미지 링크

+
+
+
+
+
+
+ + + \ No newline at end of file diff --git a/src/main/resources/static/docs/Overview.html b/src/main/resources/static/docs/Overview.html index e7f4447..a09eeae 100644 --- a/src/main/resources/static/docs/Overview.html +++ b/src/main/resources/static/docs/Overview.html @@ -667,7 +667,7 @@

Grid Status Codes

diff --git a/src/main/resources/static/docs/Question-API.html b/src/main/resources/static/docs/Question-API.html index ff252a6..7c752b5 100644 --- a/src/main/resources/static/docs/Question-API.html +++ b/src/main/resources/static/docs/Question-API.html @@ -768,7 +768,7 @@

HTTP response

diff --git a/src/main/resources/static/docs/User-API.html b/src/main/resources/static/docs/User-API.html index 703104f..9ff2756 100644 --- a/src/main/resources/static/docs/User-API.html +++ b/src/main/resources/static/docs/User-API.html @@ -724,7 +724,7 @@

Response fields

diff --git a/src/main/resources/static/docs/index.html b/src/main/resources/static/docs/index.html index 26378a1..be37ec9 100644 --- a/src/main/resources/static/docs/index.html +++ b/src/main/resources/static/docs/index.html @@ -504,6 +504,12 @@

Samsion API Doc

  • FuneralShop 가게 정보 조회
  • +
  • Grid-API + +
  • @@ -3763,6 +3769,190 @@

    +

    Grid-API

    +
    +
    +

    Grid 정보 조회

    +
    +

    HTTP request

    +
    +
    +
    GET /grid HTTP/1.1
    +Content-Type: application/json;charset=UTF-8
    +Authorization: access token
    +Host: localhost:8080
    +
    +
    +
    +
    +

    Request headers

    + ++++ + + + + + + + + + + + + +
    NameDescription

    Authorization

    access token

    +
    +
    +

    HTTP response

    +
    +
    +
    HTTP/1.1 200 OK
    +Content-Type: application/json;charset=UTF-8
    +Content-Length: 252
    +
    +{
    +  "gridCheckList" : [ {
    +    "gridNum" : 1,
    +    "check" : true
    +  }, {
    +    "gridNum" : 2,
    +    "check" : true
    +  }, {
    +    "gridNum" : 3,
    +    "check" : true
    +  }, {
    +    "gridNum" : 4,
    +    "check" : true
    +  } ],
    +  "gridImageUrl" : "imageurl"
    +}
    +
    +
    +
    +
    +

    Response fields

    + +++++ + + + + + + + + + + + + + + + + + + + + + + + + +
    PathTypeDescription

    gridCheckList[].check

    Boolean

    그리드 체크 여부

    gridCheckList[].gridNum

    Number

    그리드 번호

    gridImageUrl

    String

    그리드 이미지 링크

    +
    +
    +
    +
    +

    Stamp 정보 조회

    +
    +

    HTTP request

    +
    +
    +
    GET /grid/stamp HTTP/1.1
    +Content-Type: application/json;charset=UTF-8
    +Authorization: access token
    +Host: localhost:8080
    +
    +
    +
    +
    +

    Request headers

    + ++++ + + + + + + + + + + + + +
    NameDescription

    Authorization

    access token

    +
    +
    +

    HTTP response

    +
    +
    +
    HTTP/1.1 200 OK
    +Content-Type: application/json;charset=UTF-8
    +Content-Length: 79
    +
    +{
    +  "content" : [ {
    +    "stampId" : 1,
    +    "imageUrl" : "imageurl"
    +  } ]
    +}
    +
    +
    +
    +
    +

    Response fields

    + +++++ + + + + + + + + + + + + + + + + + + + +
    PathTypeDescription

    content[].stampId

    Number

    스탬프 아이디

    content[].imageUrl

    String

    스탬프 이미지 링크

    +
    +
    +
    +
    +