Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
zdhxiong committed Sep 1, 2020
1 parent c908b31 commit 4113c2c
Show file tree
Hide file tree
Showing 18 changed files with 88 additions and 46 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
# MDClub 的 OpenAPI 描述文件
## [MDClub 官网](https://mdclub.org) | [API 文档](https://mdclub.org/api/)

## MDClub 的 OpenAPI 描述文件

这是根据 [OpenApi](https://github.com/OAI/OpenAPI-Specification) 3.0.2 规范编写的文件。

OpenAPI 是描述 API 的最佳规范。它拥有生成模拟数据、驱动测试自动化、生成多种语言的 SDK 等非常多的功能。
30 changes: 15 additions & 15 deletions dist/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -6089,7 +6089,7 @@
},
"password": {
"type": "string",
"description": "经过 hash1 加密后的密码",
"description": "经过 hash1 加密后的密码\n\n* 若你使用的是 [mdclub-sdk-js](https://github.com/zdhxiong/mdclub-sdk-js),则 SDK 内部已经实现了 sha1 加密,该参数直接传入明文密码即可。\n* 若你直接调用 REST API,则需要自己实现 sha1 加密。\n",
"example": "7c4a8d09ca3762af61e59520943dc26494f8941b"
},
"device": {
Expand Down Expand Up @@ -6128,7 +6128,7 @@
},
"password": {
"type": "string",
"description": "hash1 加密后的密码",
"description": "经过 hash1 加密后的密码\n\n* 若你使用的是 [mdclub-sdk-js](https://github.com/zdhxiong/mdclub-sdk-js),则 SDK 内部已经实现了 sha1 加密,该参数直接传入明文密码即可。\n* 若你直接调用 REST API,则需要自己实现 sha1 加密。\n",
"example": "7c4a8d09ca3762af61e59520943dc26494f8941b"
}
},
Expand Down Expand Up @@ -6159,7 +6159,7 @@
},
"password": {
"type": "string",
"description": "hash1 加密后的密码",
"description": "经过 hash1 加密后的密码\n\n* 若你使用的是 [mdclub-sdk-js](https://github.com/zdhxiong/mdclub-sdk-js),则 SDK 内部已经实现了 sha1 加密,该参数直接传入明文密码即可。\n* 若你直接调用 REST API,则需要自己实现 sha1 加密。\n",
"example": "7c4a8d09ca3762af61e59520943dc26494f8941b"
}
},
Expand Down Expand Up @@ -7571,7 +7571,7 @@
"answer_ids": {
"name": "answer_id",
"in": "query",
"description": "“,”分隔的回答ID,最多可提供100个ID",
"description": " `,` 分隔的回答ID,最多可提供100个ID",
"schema": {
"type": "array",
"items": {
Expand Down Expand Up @@ -7761,7 +7761,7 @@
"include.answer": {
"name": "include",
"in": "query",
"description": "响应中需要包含的关联数据,用“,”分隔。可以为 `user`, `question`, `voting`",
"description": "响应中需要包含的关联数据,用 `,` 分隔。可以为 `user`, `question`, `voting`",
"schema": {
"type": "array",
"items": {
Expand All @@ -7783,7 +7783,7 @@
"include.article": {
"name": "include",
"in": "query",
"description": "响应中需要包含的关联数据,用“,”分隔。可以为 `user`, `topics`, `is_following`, `voting`",
"description": "响应中需要包含的关联数据,用 `,` 分隔。可以为 `user`, `topics`, `is_following`, `voting`",
"schema": {
"type": "array",
"items": {
Expand All @@ -7806,7 +7806,7 @@
"include.comment": {
"name": "include",
"in": "query",
"description": "响应中需要包含的关联数据,用“,”分隔。可以为 `user`, `voting`",
"description": "响应中需要包含的关联数据,用 `,` 分隔。可以为 `user`, `voting`",
"schema": {
"type": "array",
"items": {
Expand All @@ -7827,7 +7827,7 @@
"include.image": {
"name": "include",
"in": "query",
"description": "响应中需要包含的关联数据,用“,”分隔。可以为 `user`, `question`, `article`, `answer`",
"description": "响应中需要包含的关联数据,用 `,` 分隔。可以为 `user`, `question`, `article`, `answer`",
"schema": {
"type": "array",
"items": {
Expand All @@ -7850,7 +7850,7 @@
"include.notification": {
"name": "include",
"in": "query",
"description": "响应中需要包含的关联数据,用“,”分隔。可以为 `receiver`, `sender`, `article`, `question`, `answer`, `comment`, `reply`",
"description": "响应中需要包含的关联数据,用 `,` 分隔。可以为 `receiver`, `sender`, `article`, `question`, `answer`, `comment`, `reply`",
"schema": {
"type": "array",
"items": {
Expand All @@ -7876,7 +7876,7 @@
"include.question": {
"name": "include",
"in": "query",
"description": "响应中需要包含的关联数据,用“,”分隔。可以为 `user`, `topics`, `is_following`, `voting`",
"description": "响应中需要包含的关联数据,用 `,` 分隔。可以为 `user`, `topics`, `is_following`, `voting`",
"schema": {
"type": "array",
"items": {
Expand All @@ -7899,7 +7899,7 @@
"include.report": {
"name": "include",
"in": "query",
"description": "响应中需要包含的关联数据,用“,”分隔。可以为 `question`, `answer`, `article`, `comment`, `user`",
"description": "响应中需要包含的关联数据,用 `,` 分隔。可以为 `question`, `answer`, `article`, `comment`, `user`",
"schema": {
"type": "array",
"items": {
Expand All @@ -7923,7 +7923,7 @@
"include.reportReason": {
"name": "include",
"in": "query",
"description": "响应中需要包含的关联数据,用“,”分隔。可以为 `reporter`, `question`, `answer`, `article`, `comment`, `user`",
"description": "响应中需要包含的关联数据,用 `,` 分隔。可以为 `reporter`, `question`, `answer`, `article`, `comment`, `user`",
"schema": {
"type": "array",
"items": {
Expand All @@ -7949,7 +7949,7 @@
"include.stats": {
"name": "include",
"in": "query",
"description": "统计数据中包含的数据,用“,”分隔,可以为 `system_info`, `total_user`, `total_question`, `total_article`, `total_answer`, `total_comment`, `new_user`, `new_question`, `new_article`, `new_answer`, `new_comment`",
"description": "统计数据中包含的数据,用 `,` 分隔,可以为 `system_info`, `total_user`, `total_question`, `total_article`, `total_answer`, `total_comment`, `new_user`, `new_question`, `new_article`, `new_answer`, `new_comment`",
"schema": {
"type": "array",
"items": {
Expand Down Expand Up @@ -7979,7 +7979,7 @@
"include.topic": {
"name": "include",
"in": "query",
"description": "响应中需要包含的关联数据,用“,”分隔。可以为 `is_following`",
"description": "响应中需要包含的关联数据,用 `,` 分隔。可以为 `is_following`",
"schema": {
"type": "array",
"items": {
Expand All @@ -7998,7 +7998,7 @@
"include.user": {
"name": "include",
"in": "query",
"description": "响应中需要包含的关联数据,用“,”分隔。可以为 `is_followed`, `is_following`, `is_me`",
"description": "响应中需要包含的关联数据,用 `,` 分隔。可以为 `is_followed`, `is_following`, `is_me`",
"schema": {
"type": "array",
"items": {
Expand Down
54 changes: 39 additions & 15 deletions dist/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4189,7 +4189,15 @@ components:
example: zdhxiong
password:
type: string
description: 经过 hash1 加密后的密码
description: >
经过 hash1 加密后的密码。
* 若你使用的是
[mdclub-sdk-js](https://github.com/zdhxiong/mdclub-sdk-js),则 SDK
内部已经实现了 sha1 加密,该参数直接传入明文密码即可。
* 若你直接调用 REST API,则需要自己实现 sha1 加密。
example: 7c4a8d09ca3762af61e59520943dc26494f8941b
device:
type: string
Expand Down Expand Up @@ -4219,7 +4227,15 @@ components:
example: hg8d3d
password:
type: string
description: hash1 加密后的密码
description: >
经过 hash1 加密后的密码。
* 若你使用的是
[mdclub-sdk-js](https://github.com/zdhxiong/mdclub-sdk-js),则 SDK
内部已经实现了 sha1 加密,该参数直接传入明文密码即可。
* 若你直接调用 REST API,则需要自己实现 sha1 加密。
example: 7c4a8d09ca3762af61e59520943dc26494f8941b
required:
- email
Expand All @@ -4243,7 +4259,15 @@ components:
example: zdhxiong
password:
type: string
description: hash1 加密后的密码
description: >
经过 hash1 加密后的密码。
* 若你使用的是
[mdclub-sdk-js](https://github.com/zdhxiong/mdclub-sdk-js),则 SDK
内部已经实现了 sha1 加密,该参数直接传入明文密码即可。
* 若你直接调用 REST API,则需要自己实现 sha1 加密。
example: 7c4a8d09ca3762af61e59520943dc26494f8941b
required:
- email
Expand Down Expand Up @@ -5214,7 +5238,7 @@ components:
answer_ids:
name: answer_id
in: query
description: '“,”分隔的回答ID,最多可提供100个ID'
description: ' `,` 分隔的回答ID,最多可提供100个ID'
schema:
type: array
items:
Expand Down Expand Up @@ -5367,7 +5391,7 @@ components:
include.answer:
name: include
in: query
description: '响应中需要包含的关联数据,用“,”分隔。可以为 `user`, `question`, `voting`'
description: '响应中需要包含的关联数据,用 `,` 分隔。可以为 `user`, `question`, `voting`'
schema:
type: array
items:
Expand All @@ -5384,7 +5408,7 @@ components:
include.article:
name: include
in: query
description: '响应中需要包含的关联数据,用“,”分隔。可以为 `user`, `topics`, `is_following`, `voting`'
description: '响应中需要包含的关联数据,用 `,` 分隔。可以为 `user`, `topics`, `is_following`, `voting`'
schema:
type: array
items:
Expand All @@ -5402,7 +5426,7 @@ components:
include.comment:
name: include
in: query
description: '响应中需要包含的关联数据,用“,”分隔。可以为 `user`, `voting`'
description: '响应中需要包含的关联数据,用 `,` 分隔。可以为 `user`, `voting`'
schema:
type: array
items:
Expand All @@ -5418,7 +5442,7 @@ components:
include.image:
name: include
in: query
description: '响应中需要包含的关联数据,用“,”分隔。可以为 `user`, `question`, `article`, `answer`'
description: '响应中需要包含的关联数据,用 `,` 分隔。可以为 `user`, `question`, `article`, `answer`'
schema:
type: array
items:
Expand All @@ -5437,7 +5461,7 @@ components:
name: include
in: query
description: >-
响应中需要包含的关联数据,用“,”分隔。可以为 `receiver`, `sender`, `article`, `question`,
响应中需要包含的关联数据,用 `,` 分隔。可以为 `receiver`, `sender`, `article`, `question`,
`answer`, `comment`, `reply`
schema:
type: array
Expand All @@ -5459,7 +5483,7 @@ components:
include.question:
name: include
in: query
description: '响应中需要包含的关联数据,用“,”分隔。可以为 `user`, `topics`, `is_following`, `voting`'
description: '响应中需要包含的关联数据,用 `,` 分隔。可以为 `user`, `topics`, `is_following`, `voting`'
schema:
type: array
items:
Expand All @@ -5478,7 +5502,7 @@ components:
name: include
in: query
description: >-
响应中需要包含的关联数据,用“,”分隔。可以为 `question`, `answer`, `article`, `comment`,
响应中需要包含的关联数据,用 `,` 分隔。可以为 `question`, `answer`, `article`, `comment`,
`user`
schema:
type: array
Expand All @@ -5499,7 +5523,7 @@ components:
name: include
in: query
description: >-
响应中需要包含的关联数据,用“,”分隔。可以为 `reporter`, `question`, `answer`, `article`,
响应中需要包含的关联数据,用 `,` 分隔。可以为 `reporter`, `question`, `answer`, `article`,
`comment`, `user`
schema:
type: array
Expand All @@ -5522,7 +5546,7 @@ components:
name: include
in: query
description: >-
统计数据中包含的数据,用“,”分隔,可以为 `system_info`, `total_user`, `total_question`,
统计数据中包含的数据,用 `,` 分隔,可以为 `system_info`, `total_user`, `total_question`,
`total_article`, `total_answer`, `total_comment`, `new_user`,
`new_question`, `new_article`, `new_answer`, `new_comment`
schema:
Expand All @@ -5549,7 +5573,7 @@ components:
include.topic:
name: include
in: query
description: '响应中需要包含的关联数据,用“,”分隔。可以为 `is_following`'
description: '响应中需要包含的关联数据,用 `,` 分隔。可以为 `is_following`'
schema:
type: array
items:
Expand All @@ -5563,7 +5587,7 @@ components:
include.user:
name: include
in: query
description: '响应中需要包含的关联数据,用“,”分隔。可以为 `is_followed`, `is_following`, `is_me`'
description: '响应中需要包含的关联数据,用 `,` 分隔。可以为 `is_followed`, `is_following`, `is_me`'
schema:
type: array
items:
Expand Down
2 changes: 1 addition & 1 deletion src/components/parameters/answer_ids.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: answer_id
in: query
description: “,”分隔的回答ID,最多可提供100个ID
description: `,` 分隔的回答ID,最多可提供100个ID
schema:
type: array
items:
Expand Down
2 changes: 1 addition & 1 deletion src/components/parameters/include.answer.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: include
in: query
description: 响应中需要包含的关联数据,用“,”分隔。可以为 `user`, `question`, `voting`
description: 响应中需要包含的关联数据,用 `,` 分隔。可以为 `user`, `question`, `voting`
schema:
type: array
items:
Expand Down
2 changes: 1 addition & 1 deletion src/components/parameters/include.article.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: include
in: query
description: 响应中需要包含的关联数据,用“,”分隔。可以为 `user`, `topics`, `is_following`, `voting`
description: 响应中需要包含的关联数据,用 `,` 分隔。可以为 `user`, `topics`, `is_following`, `voting`
schema:
type: array
items:
Expand Down
2 changes: 1 addition & 1 deletion src/components/parameters/include.comment.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: include
in: query
description: 响应中需要包含的关联数据,用“,”分隔。可以为 `user`, `voting`
description: 响应中需要包含的关联数据,用 `,` 分隔。可以为 `user`, `voting`
schema:
type: array
items:
Expand Down
2 changes: 1 addition & 1 deletion src/components/parameters/include.image.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: include
in: query
description: 响应中需要包含的关联数据,用“,”分隔。可以为 `user`, `question`, `article`, `answer`
description: 响应中需要包含的关联数据,用 `,` 分隔。可以为 `user`, `question`, `article`, `answer`
schema:
type: array
items:
Expand Down
2 changes: 1 addition & 1 deletion src/components/parameters/include.notification.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: include
in: query
description: 响应中需要包含的关联数据,用“,”分隔。可以为 `receiver`, `sender`, `article`, `question`, `answer`, `comment`, `reply`
description: 响应中需要包含的关联数据,用 `,` 分隔。可以为 `receiver`, `sender`, `article`, `question`, `answer`, `comment`, `reply`
schema:
type: array
items:
Expand Down
2 changes: 1 addition & 1 deletion src/components/parameters/include.question.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: include
in: query
description: 响应中需要包含的关联数据,用“,”分隔。可以为 `user`, `topics`, `is_following`, `voting`
description: 响应中需要包含的关联数据,用 `,` 分隔。可以为 `user`, `topics`, `is_following`, `voting`
schema:
type: array
items:
Expand Down
2 changes: 1 addition & 1 deletion src/components/parameters/include.report.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: include
in: query
description: 响应中需要包含的关联数据,用“,”分隔。可以为 `question`, `answer`, `article`, `comment`, `user`
description: 响应中需要包含的关联数据,用 `,` 分隔。可以为 `question`, `answer`, `article`, `comment`, `user`
schema:
type: array
items:
Expand Down
2 changes: 1 addition & 1 deletion src/components/parameters/include.reportReason.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: include
in: query
description: 响应中需要包含的关联数据,用“,”分隔。可以为 `reporter`, `question`, `answer`, `article`, `comment`, `user`
description: 响应中需要包含的关联数据,用 `,` 分隔。可以为 `reporter`, `question`, `answer`, `article`, `comment`, `user`
schema:
type: array
items:
Expand Down
2 changes: 1 addition & 1 deletion src/components/parameters/include.stats.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: include
in: query
description: 统计数据中包含的数据,用“,”分隔,可以为 `system_info`, `total_user`, `total_question`, `total_article`, `total_answer`, `total_comment`, `new_user`, `new_question`, `new_article`, `new_answer`, `new_comment`
description: 统计数据中包含的数据,用 `,` 分隔,可以为 `system_info`, `total_user`, `total_question`, `total_article`, `total_answer`, `total_comment`, `new_user`, `new_question`, `new_article`, `new_answer`, `new_comment`
schema:
type: array
items:
Expand Down
2 changes: 1 addition & 1 deletion src/components/parameters/include.topic.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: include
in: query
description: 响应中需要包含的关联数据,用“,”分隔。可以为 `is_following`
description: 响应中需要包含的关联数据,用 `,` 分隔。可以为 `is_following`
schema:
type: array
items:
Expand Down
2 changes: 1 addition & 1 deletion src/components/parameters/include.user.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: include
in: query
description: 响应中需要包含的关联数据,用“,”分隔。可以为 `is_followed`, `is_following`, `is_me`
description: 响应中需要包含的关联数据,用 `,` 分隔。可以为 `is_followed`, `is_following`, `is_me`
schema:
type: array
items:
Expand Down
Loading

0 comments on commit 4113c2c

Please sign in to comment.