Skip to content

Commit

Permalink
Restdocs가 build 파일에 생성이 되지 않던 문제 수정 (#359)
Browse files Browse the repository at this point in the history
* chore: gradle task 순서 변경 및 공통 경로 상수화

* docs: adoc 파일 snippet 경로 수정

* docs: adoc 파일 depth 변경
  • Loading branch information
cookienc authored Aug 15, 2023
1 parent 8f32337 commit a5c31e8
Show file tree
Hide file tree
Showing 10 changed files with 67 additions and 88 deletions.
12 changes: 6 additions & 6 deletions backend/baton/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ repositories {

ext {
set('snippetsDir', file("build/generated-snippets"))
set('restDocsCopyFrom', 'build/docs/asciidoc')
set('restDocsCopyInto', 'src/main/resources/static/docs')
}

dependencies {
Expand Down Expand Up @@ -81,15 +83,13 @@ tasks.named('asciidoctor') {
}

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

task copyDocument(type: Copy) {
dependsOn asciidoctor
from file('build/docs/asciidoc')
into file('src/main/resources/static/docs')
from file(restDocsCopyFrom)
into file(restDocsCopyInto)
}

build {
dependsOn copyDocument
}
bootJar.dependsOn('copyDocument')
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ endif::[]

===== *Http Request*

include::{snippets}/../../build/generated-snippets/member-login-profile-read-api-test/read-login-member-by-access-token/http-request.adoc[]
include::{snippets}/../../build/generated-snippets/member-read-with-logined-member-api-test/read-login-member-by-access-token/http-request.adoc[]

===== *Http Request Headers*

include::{snippets}/../../build/generated-snippets/member-login-profile-read-api-test/read-login-member-by-access-token/request-headers.adoc[]
include::{snippets}/../../build/generated-snippets/member-read-with-logined-member-api-test/read-login-member-by-access-token/request-headers.adoc[]

===== *Http Response*

include::{snippets}/../../build/generated-snippets/member-login-profile-read-api-test/read-login-member-by-access-token/http-response.adoc[]
include::{snippets}/../../build/generated-snippets/member-read-with-logined-member-api-test/read-login-member-by-access-token/http-response.adoc[]

===== *Http Response Fields*

include::{snippets}/../../build/generated-snippets/member-login-profile-read-api-test/read-login-member-by-access-token/response-fields.adoc[]
include::{snippets}/../../build/generated-snippets/member-read-with-logined-member-api-test/read-login-member-by-access-token/response-fields.adoc[]
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ endif::[]

===== *Http Request*

include::{snippets}/../../build/generated-snippets/runner-profile-read-api-test/read-my-profile-by-token/http-request.adoc[]
include::{snippets}/../../build/generated-snippets/runner-read-with-logined-runner-api-test/read-my-profile-by-token/http-request.adoc[]

===== *Http Request Headers*

include::{snippets}/../../build/generated-snippets/runner-profile-read-api-test/read-my-profile-by-token/request-headers.adoc[]
include::{snippets}/../../build/generated-snippets/runner-read-with-logined-runner-api-test/read-my-profile-by-token/request-headers.adoc[]

===== *Http Response*

include::{snippets}/../../build/generated-snippets/runner-profile-read-api-test/read-my-profile-by-token/http-response.adoc[]
include::{snippets}/../../build/generated-snippets/runner-read-with-logined-runner-api-test/read-my-profile-by-token/http-response.adoc[]

===== *Http Response Fields*

include::{snippets}/../../build/generated-snippets/runner-profile-read-api-test/read-my-profile-by-token/response-fields.adoc[]
include::{snippets}/../../build/generated-snippets/runner-read-with-logined-runner-api-test/read-my-profile-by-token/response-fields.adoc[]
18 changes: 9 additions & 9 deletions backend/baton/src/docs/asciidoc/RunnerPostReadApi.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,40 +16,40 @@ endif::[]

===== *Http Request*

include::{snippets}/../../build/generated-snippets/runner-post-read-api-test/read-referenced-by-supporter/http-request.adoc[]
include::{snippets}/../../build/generated-snippets/runner-post-read-all-api-test/read-referenced-by-supporter/http-request.adoc[]

===== *Http Request Query Parameters*

include::{snippets}/../../build/generated-snippets/runner-post-read-api-test/read-referenced-by-supporter/query-parameters.adoc[]
include::{snippets}/../../build/generated-snippets/runner-post-read-all-api-test/read-referenced-by-supporter/query-parameters.adoc[]

===== *Http Response*

include::{snippets}/../../build/generated-snippets/runner-post-read-api-test/read-referenced-by-supporter/http-response.adoc[]
include::{snippets}/../../build/generated-snippets/runner-post-read-all-api-test/read-referenced-by-supporter/http-response.adoc[]

===== *Http Response Fields*

include::{snippets}/../../build/generated-snippets/runner-post-read-api-test/read-referenced-by-supporter/response-fields.adoc[]
include::{snippets}/../../build/generated-snippets/runner-post-read-all-api-test/read-referenced-by-supporter/response-fields.adoc[]

=== *러너 게시글 상세 조회*

==== *러너 게시글 단건 상세 조회 API*

===== *Http Request*

include::{snippets}/../../build/generated-snippets/runner-post-read-api-test/read-by-runner-post-id/http-request.adoc[]
include::{snippets}/../../build/generated-snippets/runner-post-read-all-api-test/read-by-runner-post-id/http-request.adoc[]

===== *Http Request Headers

include::{snippets}/../../build/generated-snippets/runner-post-read-api-test/read-by-runner-post-id/request-headers.adoc[]
include::{snippets}/../../build/generated-snippets/runner-post-read-all-api-test/read-by-runner-post-id/request-headers.adoc[]

===== *Http Request Path Parameters*

include::{snippets}/../../build/generated-snippets/runner-post-read-api-test/read-by-runner-post-id/path-parameters.adoc[]
include::{snippets}/../../build/generated-snippets/runner-post-read-all-api-test/read-by-runner-post-id/path-parameters.adoc[]

===== *Http Response*

include::{snippets}/../../build/generated-snippets/runner-post-read-api-test/read-by-runner-post-id/http-response.adoc[]
include::{snippets}/../../build/generated-snippets/runner-post-read-all-api-test/read-by-runner-post-id/http-response.adoc[]

===== *Http Response Fields*

include::{snippets}/../../build/generated-snippets/runner-post-read-api-test/read-by-runner-post-id/response-fields.adoc[]
include::{snippets}/../../build/generated-snippets/runner-post-read-all-api-test/read-by-runner-post-id/response-fields.adoc[]
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,29 @@ endif::[]
:icons: font
:source-highlighter: highlight.js
:toc: left
:toclevels: 2
:toclevels: 3
:sectlinks:
:operation-http-request-title: Example Request
:operation-http-response-title: Example Response

== *서포터의 러너 게시글 리뷰 제안 철회*
==== *서포터의 러너 게시글 리뷰 제안 철회 API*

=== *서포터의 러너 게시글 리뷰 제안 철회 API*
===== *Http Request*

==== *Http Request*
include::{snippets}/../../build/generated-snippets/runner-post-update-applicant-cancelation-api-test/update-supporter-cancel-runner-post/http-request.adoc[]

include::{snippets}/../../build/generated-snippets/runner-post-update-supporter-cancelation-api-test/update-supporter-cancel-runner-post/http-request.adoc[]
===== *Http Request Headers*

==== *Http Request Headers*
include::{snippets}/../../build/generated-snippets/runner-post-update-applicant-cancelation-api-test/update-supporter-cancel-runner-post/request-headers.adoc[]

include::{snippets}/../../build/generated-snippets/runner-post-update-supporter-cancelation-api-test/update-supporter-cancel-runner-post/request-headers.adoc[]
===== *Http Path Parameters*

==== *Http Path Parameters*
include::{snippets}/../../build/generated-snippets/runner-post-update-applicant-cancelation-api-test/update-supporter-cancel-runner-post/path-parameters.adoc[]

include::{snippets}/../../build/generated-snippets/runner-post-update-supporter-cancelation-api-test/update-supporter-cancel-runner-post/path-parameters.adoc[]
===== *Http Response*

==== *Http Response*
include::{snippets}/../../build/generated-snippets/runner-post-update-applicant-cancelation-api-test/update-supporter-cancel-runner-post/http-response.adoc[]

include::{snippets}/../../build/generated-snippets/runner-post-update-supporter-cancelation-api-test/update-supporter-cancel-runner-post/http-response.adoc[]
===== *Http Response Headers*

==== *Http Response Headers*

include::{snippets}/../../build/generated-snippets/runner-post-update-supporter-cancelation-api-test/update-supporter-cancel-runner-post/response-headers.adoc[]
include::{snippets}/../../build/generated-snippets/runner-post-update-applicant-cancelation-api-test/update-supporter-cancel-runner-post/response-headers.adoc[]
24 changes: 3 additions & 21 deletions backend/baton/src/docs/asciidoc/RunnerProfileReadApi.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,12 @@ endif::[]

===== *Http Request*

include::{snippets}/../../build/generated-snippets/runner-profile-read-api-test/read-runner-profile/http-request.adoc[]
include::{snippets}/../../build/generated-snippets/runner-read-by-runner-id-api-test/read-runner-profile/http-request.adoc[]

===== *Http Response*

include::{snippets}/../../build/generated-snippets/runner-profile-read-api-test/read-runner-profile/http-response.adoc[]
include::{snippets}/../../build/generated-snippets/runner-read-by-runner-id-api-test/read-runner-profile/http-response.adoc[]

===== *Http Response Fields*

include::{snippets}/../../build/generated-snippets/runner-profile-read-api-test/read-runner-profile/response-fields.adoc[]

==== *러너 마이페이지 프로필 조회 API*

===== *Http Request*

include::{snippets}/../../build/generated-snippets/runner-profile-read-api-test/read-my-profile-by-token/http-request.adoc[]

===== *Http Request Headers*

include::{snippets}/../../build/generated-snippets/runner-profile-read-api-test/read-my-profile-by-token/request-headers.adoc[]

===== *Http Response*

include::{snippets}/../../build/generated-snippets/runner-profile-read-api-test/read-my-profile-by-token/http-response.adoc[]

===== *Http Response Fields*

include::{snippets}/../../build/generated-snippets/runner-profile-read-api-test/read-my-profile-by-token/response-fields.adoc[]
include::{snippets}/../../build/generated-snippets/runner-read-by-runner-id-api-test/read-runner-profile/response-fields.adoc[]
26 changes: 13 additions & 13 deletions backend/baton/src/docs/asciidoc/RunnerProfileUpdateApi.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,31 @@ endif::[]
:icons: font
:source-highlighter: highlight.js
:toc: left
:toclevels: 2
:toclevels: 3
:sectlinks:
:operation-http-request-title: Example Request
:operation-http-response-title: Example Response

== *러너 프로필 수정*
=== *러너 프로필 수정*

=== *러너 프로필 수정 API*
==== *러너 프로필 수정 API*

==== *Http Request*
===== *Http Request*

include::{snippets}/../../build/generated-snippets/runner-profile-update-api-test/update-runner-profile/http-request.adoc[]
include::{snippets}/../../build/generated-snippets/runner-update-api-test/update-runner-profile/http-request.adoc[]

==== *Http Request Headers*
===== *Http Request Headers*

include::{snippets}/../../build/generated-snippets/runner-profile-update-api-test/update-runner-profile/request-headers.adoc[]
include::{snippets}/../../build/generated-snippets/runner-update-api-test/update-runner-profile/request-headers.adoc[]

==== *Http Request Body*
===== *Http Request Body*

include::{snippets}/../../build/generated-snippets/runner-profile-update-api-test/update-runner-profile/request-body.adoc[]
include::{snippets}/../../build/generated-snippets/runner-update-api-test/update-runner-profile/request-body.adoc[]

==== *Http Response*
===== *Http Response*

include::{snippets}/../../build/generated-snippets/runner-profile-update-api-test/update-runner-profile/http-response.adoc[]
include::{snippets}/../../build/generated-snippets/runner-update-api-test/update-runner-profile/http-response.adoc[]

==== *Http Response Headers*
===== *Http Response Headers*

include::{snippets}/../../build/generated-snippets/runner-profile-update-api-test/update-runner-profile/response-headers.adoc[]
include::{snippets}/../../build/generated-snippets/runner-update-api-test/update-runner-profile/response-headers.adoc[]
22 changes: 11 additions & 11 deletions backend/baton/src/docs/asciidoc/SupporterProfileReadApi.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@ endif::[]
:icons: font
:source-highlighter: highlight.js
:toc: left
:toclevels: 2
:toclevels: 3
:sectlinks:
:operation-http-request-title: Example Request
:operation-http-response-title: Example Response

== *서포터 프로필 조회*
=== *서포터 프로필 조회*

=== *서포터 마이페이지 프로필 조회 API*
==== *서포터 마이페이지 프로필 조회 API*

==== *Http Request*
===== *Http Request*

include::{snippets}/../../build/generated-snippets/supporter-profile-read-api-test/read-my-profile-by-token/http-request.adoc[]
include::{snippets}/../../build/generated-snippets/supporter-read-by-guest-api-test/read-my-profile-by-token/http-request.adoc[]

==== *Http Request Headers*
===== *Http Request Headers*

include::{snippets}/../../build/generated-snippets/supporter-profile-read-api-test/read-my-profile-by-token/request-headers.adoc[]
include::{snippets}/../../build/generated-snippets/supporter-read-by-guest-api-test/read-my-profile-by-token/request-headers.adoc[]

==== *Http Response*
===== *Http Response*

include::{snippets}/../../build/generated-snippets/supporter-profile-read-api-test/read-my-profile-by-token/http-response.adoc[]
include::{snippets}/../../build/generated-snippets/supporter-read-by-guest-api-test/read-my-profile-by-token/http-response.adoc[]

==== *Http Response Fields*
===== *Http Response Fields*

include::{snippets}/../../build/generated-snippets/supporter-profile-read-api-test/read-my-profile-by-token/response-fields.adoc[]
include::{snippets}/../../build/generated-snippets/supporter-read-by-guest-api-test/read-my-profile-by-token/response-fields.adoc[]
10 changes: 5 additions & 5 deletions backend/baton/src/docs/asciidoc/SupporterProfileUpdateApi.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ endif::[]

===== *Http Request*

include::{snippets}/../../build/generated-snippets/supporter-profile-update-api-test/update-supporter-profile/http-request.adoc[]
include::{snippets}/../../build/generated-snippets/supporter-update-api-test/update-supporter-profile/http-request.adoc[]

===== *Http Request Headers*

include::{snippets}/../../build/generated-snippets/supporter-profile-update-api-test/update-supporter-profile/request-headers.adoc[]
include::{snippets}/../../build/generated-snippets/supporter-update-api-test/update-supporter-profile/request-headers.adoc[]

===== *Http Request Body*

include::{snippets}/../../build/generated-snippets/supporter-profile-update-api-test/update-supporter-profile/request-body.adoc[]
include::{snippets}/../../build/generated-snippets/supporter-update-api-test/update-supporter-profile/request-body.adoc[]

===== *Http Response*

include::{snippets}/../../build/generated-snippets/supporter-profile-update-api-test/update-supporter-profile/http-response.adoc[]
include::{snippets}/../../build/generated-snippets/supporter-update-api-test/update-supporter-profile/http-response.adoc[]

===== *Http Response Headers*

include::{snippets}/../../build/generated-snippets/supporter-profile-update-api-test/update-supporter-profile/response-headers.adoc[]
include::{snippets}/../../build/generated-snippets/supporter-update-api-test/update-supporter-profile/response-headers.adoc[]
1 change: 0 additions & 1 deletion backend/baton/src/docs/asciidoc/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,5 @@ include::RunnerPostCreateApi.adoc[]
== *[ 서포터 ]*

include::SupporterProfileReadApi.adoc[]

include::SupporterProfileUpdateApi.adoc[]
include::RunnerPostUpdateApi.adoc[]

0 comments on commit a5c31e8

Please sign in to comment.