Skip to content

Instantly share code, notes, and snippets.

@choi-ys
Created March 29, 2022 05:39
Show Gist options
  • Save choi-ys/8d7c76968fb6a0d272a084f8ff46daaf to your computer and use it in GitHub Desktop.
Save choi-ys/8d7c76968fb6a0d272a084f8ff46daaf to your computer and use it in GitHub Desktop.
[Spring REST Docs]MockMvc를 이용한 TC 기반의 API Docs 생성 시, 요청/응답 항목 문서화를 위한 adoc snippet template
{{title}}
|===
|코드|코드명
{{#fields}}
|{{#tableCellContent}}`+{{path}}+`{{/tableCellContent}}
|{{#tableCellContent}}{{description}}{{/tableCellContent}}
{{/fields}}
|===
|===
|항목명|타입|필수여부|설명|제약조건
{{#fields}}
|{{#tableCellContent}}`+{{path}}+`{{/tableCellContent}}
|{{#tableCellContent}}`+{{type}}+`{{/tableCellContent}}
|{{#tableCellContent}}{{^optional}}true{{/optional}}{{#optional}}false{{/optional}}{{/tableCellContent}}
|{{#tableCellContent}}{{description}}{{/tableCellContent}}
|{{#tableCellContent}}{{#format}}{{.}}{{/format}}{{/tableCellContent}}
{{/fields}}
|===
|===
|항목명|필수여부|설명
{{#parameters}}
|{{#tableCellContent}}`+{{name}}+`{{/tableCellContent}}
|{{#tableCellContent}}{{^optional}}true{{/optional}}{{#optional}}false{{/optional}}{{/tableCellContent}}
|{{#tableCellContent}}{{description}}{{/tableCellContent}}
{{/parameters}}
|===
|===
|항목명|타입|필수여부|설명
{{#fields}}
|{{#tableCellContent}}`+{{path}}+`{{/tableCellContent}}
|{{#tableCellContent}}`+{{type}}+`{{/tableCellContent}}
|{{#tableCellContent}}{{^optional}}true{{/optional}}{{#optional}}false{{/optional}}{{/tableCellContent}}
|{{#tableCellContent}}{{description}}{{/tableCellContent}}
{{/fields}}
|===
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment