Skip to content

Commit

Permalink
Merge pull request #32 from 2024-Iris/restdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
lvalentine6 authored Aug 8, 2024
2 parents c713390 + 4e233bd commit 347862e
Show file tree
Hide file tree
Showing 3 changed files with 671 additions and 42 deletions.
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ asciidoctor {
dependsOn test
}

asciidoctor.doFirst {
delete file('src/main/resources/static/docs')
}

bootJar {
dependsOn asciidoctor
from("${asciidoctor.outputDir}/html5") {
Expand Down
38 changes: 38 additions & 0 deletions src/docs/asciidoc/api-guide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,36 +20,45 @@ endif::[]
=== 1.1 OAuth 로그인

==== HTTP 요청

include::{snippets}/issuefy/oauth/login/http-request.adoc[]

==== HTTP 응답

include::{snippets}/issuefy/oauth/login/http-response.adoc[]

===== 응답 필드

include::{snippets}/issuefy/oauth/login/response-fields.adoc[]

=== 1.2 OAuth 로그아웃

==== HTTP 요청

include::{snippets}/issuefy/oauth/logout/http-request.adoc[]

===== 요청 헤더

include::{snippets}/issuefy/oauth/logout/request-headers.adoc[]

==== HTTP 응답

include::{snippets}/issuefy/oauth/logout/http-response.adoc[]

== 2. 리포지토리

=== 2.1 리포지토리 구독

==== HTTP 요청

include::{snippets}/issuefy/subscriptions/post/http-request.adoc[]

===== 요청 본문

include::{snippets}/issuefy/subscriptions/post/request-fields.adoc[]

==== HTTP 응답

include::{snippets}/issuefy/subscriptions/post/http-response.adoc[]

=== 2.2 리포지토리 구독 취소
Expand All @@ -59,120 +68,149 @@ include::{snippets}/issuefy/subscriptions/post/http-response.adoc[]
include::{snippets}/issuefy/subscriptions/delete/http-request.adoc[]

==== HTTP 응답

include::{snippets}/issuefy/subscriptions/delete/http-response.adoc[]

=== 2.3 구독중인 리포지토리 목록 조회

==== HTTP 요청

include::{snippets}/issuefy/subscriptions/get/http-request.adoc[]

==== HTTP 응답

include::{snippets}/issuefy/subscriptions/get/http-response.adoc[]

=== 2.4 리포지토리 즐겨찾기

==== HTTP 요청

include::{snippets}/issuefy/subscriptions/star/http-request.adoc[]

===== 경로 매개변수

include::{snippets}/issuefy/subscriptions/star/path-parameters.adoc[]

==== HTTP 응답

include::{snippets}/issuefy/subscriptions/star/http-response.adoc[]

== 3. 이슈

=== 3.1 이슈 목록 조회

==== HTTP 요청

include::{snippets}/issuefy/issues/get/http-request.adoc[]

===== 경로 매개변수

include::{snippets}/issuefy/issues/get/path-parameters.adoc[]

==== HTTP 응답
// TODO: 이슈 응답 수정
include::{snippets}/issuefy/issues/get/http-response.adoc[]

===== 응답 본문

include::{snippets}/issuefy/issues/get/response-body.adoc[]

== 4. Server-Sent Events (SSE)

=== 4.1 SSE 연결

==== HTTP 요청

include::{snippets}/issuefy/sse/connect/http-request.adoc[]

==== HTTP 응답

include::{snippets}/issuefy/sse/connect/http-response.adoc[]

=== 4.2 SSE 수신

==== HTTP 요청

include::{snippets}/issuefy/sse/receive/http-request.adoc[]

===== 요청 필드

include::{snippets}/issuefy/sse/receive/request-fields.adoc[]

==== HTTP 응답

include::{snippets}/issuefy/sse/receive/http-response.adoc[]

== 5. 알림

=== 5.1 알림 조회

==== HTTP 요청

include::{snippets}/issuefy/notifications/get/http-request.adoc[]

==== HTTP 응답

include::{snippets}/issuefy/notifications/get/http-response.adoc[]

===== 응답 필드

include::{snippets}/issuefy/notifications/get/response-fields.adoc[]

=== 5.2 알림 읽음 여부 업데이트

==== HTTP 요청

include::{snippets}/issuefy/notifications/update/http-request.adoc[]

===== 요청 필드

include::{snippets}/issuefy/notifications/update/request-fields.adoc[]

==== HTTP 응답

include::{snippets}/issuefy/notifications/update/http-response.adoc[]

== 6. 마이페이지

=== 6.1 사용자 정보 조회

==== HTTP 요청

include::{snippets}/issuefy/user/get-user-info/http-request.adoc[]

==== HTTP 응답

include::{snippets}/issuefy/user/get-user-info/http-response.adoc[]

===== 응답 필드

include::{snippets}/issuefy/user/get-user-info/response-fields.adoc[]

=== 6.2 알림 수신 여부 업데이트

==== HTTP 요청

include::{snippets}/issuefy/user/update-alert/http-request.adoc[]

===== 요청 필드

include::{snippets}/issuefy/user/update-alert/request-fields.adoc[]

==== HTTP 응답

include::{snippets}/issuefy/user/update-alert/http-response.adoc[]

=== 6.3 이메일 업데이트

==== HTTP 요청

include::{snippets}/issuefy/user/update-email/http-request.adoc[]

===== 요청 필드

include::{snippets}/issuefy/user/update-email/request-fields.adoc[]

==== HTTP 응답

include::{snippets}/issuefy/user/update-email/http-response.adoc[]
Loading

0 comments on commit 347862e

Please sign in to comment.