From 495aad6a2d5a9f3e95c1a1aa96dbd391d19b3511 Mon Sep 17 00:00:00 2001
From: syuilo <syuilotan@yahoo.co.jp>
Date: Mon, 25 Feb 2019 03:35:45 +0900
Subject: [PATCH] Improve doc

---
 src/server/api/endpoints/users/lists/list.ts |  9 +++++++-
 src/server/api/endpoints/users/lists/show.ts |  4 ++++
 src/server/api/openapi/schemas.ts            | 22 ++++++++++++++++++++
 3 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/src/server/api/endpoints/users/lists/list.ts b/src/server/api/endpoints/users/lists/list.ts
index 632f4e7e5b..ece2af5603 100644
--- a/src/server/api/endpoints/users/lists/list.ts
+++ b/src/server/api/endpoints/users/lists/list.ts
@@ -10,7 +10,14 @@ export const meta = {
 
 	requireCredential: true,
 
-	kind: 'account-read'
+	kind: 'account-read',
+
+	res: {
+		type: 'array',
+		items: {
+			type: 'UserList',
+		},
+	},
 };
 
 export default define(meta, async (ps, me) => {
diff --git a/src/server/api/endpoints/users/lists/show.ts b/src/server/api/endpoints/users/lists/show.ts
index 2f3c8889ad..0fab2fa499 100644
--- a/src/server/api/endpoints/users/lists/show.ts
+++ b/src/server/api/endpoints/users/lists/show.ts
@@ -23,6 +23,10 @@ export const meta = {
 		},
 	},
 
+	res: {
+		type: 'UserList'
+	},
+
 	errors: {
 		noSuchList: {
 			message: 'No such list.',
diff --git a/src/server/api/openapi/schemas.ts b/src/server/api/openapi/schemas.ts
index 4f63c7aefd..cca789bf7a 100644
--- a/src/server/api/openapi/schemas.ts
+++ b/src/server/api/openapi/schemas.ts
@@ -97,6 +97,28 @@ export const schemas = {
 		required: ['id', 'name', 'username', 'createdAt']
 	},
 
+	UserList: {
+		type: 'object',
+		properties: {
+			id: {
+				type: 'string',
+				format: 'id',
+				description: 'The unique identifier for this UserList.',
+				example: 'xxxxxxxxxxxxxxxxxxxxxxxx',
+			},
+			createdAt: {
+				type: 'string',
+				format: 'date-time',
+				description: 'The date that the UserList was created.'
+			},
+			title: {
+				type: 'string',
+				description: 'The name of the UserList.'
+			},
+		},
+		required: ['id', 'createdAt', 'title']
+	},
+
 	Note: {
 		type: 'object',
 		properties: {