作者 tangxvhui

调整api

syntax = "v1"
import "core/article_type.api"
import "core/comment.api"
import "core/message.api"
import "core/article_tag.api"
... ...
... ... @@ -43,6 +43,34 @@
]
}
},
"v1/mini/article/mark/user_read": {
"post": {
"summary": "小程序标记当前人员查看的文章",
"operationId": "MiniArticleMarkUserRead",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/MiniArticleMarkUserReadResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/MiniArticleMarkUserReadRequest"
}
}
],
"requestBody": {},
"tags": [
"article"
]
}
},
"v1/mini/article/search/me": {
"post": {
"summary": "小程序获取我发布的文章",
... ... @@ -153,6 +181,62 @@
]
}
},
"v1/mini/article_backup/search": {
"post": {
"summary": "小程序获取文章的编辑记录",
"operationId": "MiniArticleBackupSearch",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/MiniArticleBackupSearchResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/MiniArticleBackupSearchRequest"
}
}
],
"requestBody": {},
"tags": [
"article"
]
}
},
"v1/mini/article_draft": {
"post": {
"summary": "小程序创建文章进草稿箱",
"operationId": "MiniCreateArticleDraft",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/MiniArticleSearchMeResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/MiniArticleSearchMeRequest"
}
}
],
"requestBody": {},
"tags": [
"article"
]
}
},
"v1/mini/comment": {
"get": {
"summary": "小程序评论",
... ... @@ -557,6 +641,60 @@
]
}
},
"v1/system/article/search": {
"post": {
"summary": "管理后台获取文章列表",
"operationId": "SystemSearchArticle",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/SystemArticleSearchResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/SystemArticleSearchRequest"
}
}
],
"requestBody": {},
"tags": [
"article"
]
}
},
"v1/system/article/{id}": {
"get": {
"summary": "管理后台获取文章内容详情",
"operationId": "SystemGetArticle",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/SystemArticleGetResponse"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
}
],
"requestBody": {},
"tags": [
"article"
]
}
},
"v1/system/article_tag": {
"post": {
"summary": "后台创建文章标签",
... ... @@ -798,13 +936,13 @@
}
},
"v1/system/role/{id}": {
"delete": {
"operationId": "systemDeleteRole",
"get": {
"operationId": "systemGetRole",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/RoleDeleteResponse"
"$ref": "#/definitions/RoleGetResponse"
}
}
},
... ... @@ -814,14 +952,6 @@
"in": "path",
"required": true,
"type": "string"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/RoleDeleteRequest"
}
}
],
"requestBody": {},
... ... @@ -829,13 +959,13 @@
"role"
]
},
"post": {
"operationId": "systemGetRole",
"delete": {
"operationId": "systemDeleteRole",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/RoleGetResponse"
"$ref": "#/definitions/RoleDeleteResponse"
}
}
},
... ... @@ -851,7 +981,7 @@
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/RoleGetRequest"
"$ref": "#/definitions/RoleDeleteRequest"
}
}
],
... ... @@ -891,6 +1021,34 @@
"role"
]
}
},
"v1/user/mylike": {
"post": {
"summary": "我点赞的文章或评论",
"operationId": "miniMyLike",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/MiniMyLikeResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/MiniMyLikeRequest"
}
}
],
"requestBody": {},
"tags": [
"user"
]
}
}
},
"definitions": {
... ... @@ -1304,7 +1462,7 @@
"description": " 创建时间"
},
"user": {
"$ref": "#/definitions/User",
"$ref": "#/definitions/SimpleUser",
"description": " 操作人"
},
"article": {
... ... @@ -1312,7 +1470,7 @@
"description": " 文章"
},
"comment": {
"$ref": "#/definitions/Comment",
"$ref": "#/definitions/SimpleComment",
"description": " 评论(不一定是自己,可能是被人@到)"
}
},
... ... @@ -1452,6 +1610,91 @@
"total"
]
},
"MiniArticleBackupItem": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"title": {
"type": "string"
},
"content": {
"type": "string"
},
"images": {
"type": "array",
"items": {
"type": "string"
}
},
"createdAt": {
"type": "integer",
"format": "int64"
},
"location": {
"$ref": "#/definitions/Location"
}
},
"title": "MiniArticleBackupItem",
"required": [
"id",
"title",
"content",
"images",
"createdAt",
"location"
]
},
"MiniArticleBackupSearchRequest": {
"type": "object",
"properties": {
"page": {
"type": "integer",
"format": "int32"
},
"size": {
"type": "integer",
"format": "int32"
},
"articleId": {
"type": "integer",
"format": "int32"
},
"": {
"type": "integer",
"format": "int64",
"description": " 服务端自动获取"
}
},
"title": "MiniArticleBackupSearchRequest",
"required": [
"page",
"size",
"articleId"
]
},
"MiniArticleBackupSearchResponse": {
"type": "object",
"properties": {
"total": {
"type": "integer",
"format": "int64"
},
"list": {
"type": "array",
"items": {
"$ref": "#/definitions/MiniArticleBackupItem"
}
}
},
"title": "MiniArticleBackupSearchResponse",
"required": [
"total",
"list"
]
},
"MiniArticleCreateRequest": {
"type": "object",
"properties": {
... ... @@ -1518,32 +1761,70 @@
"id"
]
},
"MiniArticleGetRequest": {
"MiniArticleDraftCreateRequest": {
"type": "object",
"properties": {
"id": {
"template": {
"type": "integer",
"format": "int64",
"description": "id"
"format": "int32",
"description": " 使用哪个模板进行编辑 0、无 1、演绎式 2、归纳式"
},
"companyId": {
"type": "integer",
"format": "int64"
}
},
"title": "MiniArticleGetRequest",
"required": [
"id",
"-"
]
},
"MiniArticleGetResponse": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64",
"description": "id"
"content": {
"type": "array",
"items": {
"type": "string"
},
"description": " 填写的内容"
},
"title": {
"type": "string",
"description": "标题"
},
"images": {
"type": "array",
"items": {
"type": "string"
},
"description": "图片"
}
},
"title": "MiniArticleDraftCreateRequest",
"required": [
"template",
"content",
"title",
"images"
]
},
"MiniArticleDraftCreateResponse": {
"type": "object",
"title": "MiniArticleDraftCreateResponse"
},
"MiniArticleGetRequest": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64",
"description": "id"
},
"": {
"type": "integer",
"format": "int64"
}
},
"title": "MiniArticleGetRequest",
"required": [
"id"
]
},
"MiniArticleGetResponse": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64",
"description": "id"
},
"title": {
"type": "string",
... ... @@ -1616,6 +1897,11 @@
"type": "integer",
"format": "int32",
"description": " 评论的展示状态(0显示、1不显示)"
},
"edit": {
"type": "integer",
"format": "int32",
"description": " 文章是否存在变更记录 (0 不存在 1存在)"
}
},
"title": "MiniArticleGetResponse",
... ... @@ -1633,17 +1919,55 @@
"countLove",
"countComment",
"countRead",
"show"
"show",
"edit"
]
},
"MiniArticleMarkUserReadRequest": {
"type": "object",
"properties": {
"": {
"type": "integer",
"format": "int64",
"description": " 当前操作人"
},
"": {
"type": "integer",
"format": "int64",
"description": " 当前公司"
},
"articleId": {
"type": "integer",
"format": "int64",
"description": " 文章id"
}
},
"title": "MiniArticleMarkUserReadRequest",
"required": [
"articleId"
]
},
"MiniArticleMarkUserReadResponse": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
}
},
"title": "MiniArticleMarkUserReadResponse",
"required": [
"id"
]
},
"MiniArticleSearchMeRequest": {
"type": "object",
"properties": {
"authorId": {
"": {
"type": "integer",
"format": "int64"
},
"companyId": {
"": {
"type": "integer",
"format": "int64"
},
... ... @@ -1658,7 +1982,6 @@
},
"title": "MiniArticleSearchMeRequest",
"required": [
"-",
"page",
"size"
]
... ... @@ -1683,6 +2006,44 @@
"list"
]
},
"MiniMyLikeRequest": {
"type": "object",
"properties": {
"page": {
"type": "integer",
"format": "int32"
},
"size": {
"type": "integer",
"format": "int32"
}
},
"title": "MiniMyLikeRequest",
"required": [
"page",
"size"
]
},
"MiniMyLikeResponse": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"$ref": "#/definitions/MyLikeItem"
}
},
"total": {
"type": "integer",
"format": "int64"
}
},
"title": "MiniMyLikeResponse",
"required": [
"list",
"total"
]
},
"MiniSetUserLikeRequset": {
"type": "object",
"properties": {
... ... @@ -1696,7 +2057,7 @@
"format": "int64",
"description": "评论id"
},
"userId": {
"": {
"type": "integer",
"format": "int64",
"description": "操作人"
... ... @@ -1711,7 +2072,6 @@
"required": [
"articleId",
"commentId",
"-",
"flag"
]
},
... ... @@ -1873,6 +2233,13 @@
"$ref": "#/definitions/Account"
},
"description": " 公司账号"
},
"auths": {
"type": "array",
"items": {
"$ref": "#/definitions/Auth"
},
"description": " 权限列表"
}
},
"title": "MiniUserInfoResponse",
... ... @@ -1881,7 +2248,8 @@
"totalArticle",
"totalLoved",
"totalAccepted",
"accounts"
"accounts",
"auths"
]
},
"MiniUserLikeArticleRequest": {
... ... @@ -1892,7 +2260,7 @@
"format": "int64",
"description": " 文章id"
},
"companyId": {
"": {
"type": "integer",
"format": "int64",
"description": "公司id"
... ... @@ -1911,7 +2279,6 @@
"title": "MiniUserLikeArticleRequest",
"required": [
"articleId",
"-",
"page",
"size"
]
... ... @@ -2017,6 +2384,53 @@
"companyId"
]
},
"MyLikeItem": {
"type": "object",
"properties": {
"userId": {
"type": "integer",
"format": "int64",
"description": " 发布人id"
},
"articleId": {
"type": "integer",
"format": "int64",
"description": " 文章id"
},
"commentId": {
"type": "integer",
"format": "int64",
"description": " 评论id"
},
"createdAt": {
"type": "integer",
"format": "int64",
"description": " 创建时间"
},
"user": {
"$ref": "#/definitions/SimpleUser",
"description": " 发布人"
},
"article": {
"$ref": "#/definitions/SimpleArticle",
"description": " 文章"
},
"comment": {
"$ref": "#/definitions/SimpleComment",
"description": " 评论"
}
},
"title": "MyLikeItem",
"required": [
"userId",
"articleId",
"commentId",
"createdAt",
"user",
"article",
"comment"
]
},
"RoleDeleteRequest": {
"type": "object",
"properties": {
... ... @@ -2118,11 +2532,13 @@
},
"title": "RoleItem",
"required": [
"companyId",
"name",
"authIds",
"authsDesc",
"usersDesc",
"remark",
"users",
"updatedAt"
]
},
... ... @@ -2232,6 +2648,10 @@
"type": "string",
"description": " 文章标题"
},
"summary": {
"type": "string",
"description": " 文章概要"
},
"countLove": {
"type": "integer",
"format": "int32",
... ... @@ -2241,14 +2661,341 @@
"type": "integer",
"format": "int32",
"description": " 评论数量"
},
"show": {
"type": "integer",
"format": "int32",
"description": " 文章的展示状态(0显示、1不显示)"
}
},
"title": "SimpleArticle",
"required": [
"id",
"title",
"summary",
"countLove",
"countComment",
"show"
]
},
"SimpleComment": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"content": {
"type": "string",
"description": " 评论内容"
},
"countLove": {
"type": "integer",
"format": "int32",
"description": " 点赞数量"
},
"countComment": {
"type": "integer",
"format": "int32",
"description": " 评论数量"
},
"show": {
"type": "integer",
"format": "int32",
"description": " 评论的展示状态(0显示、1不显示)"
}
},
"title": "SimpleComment",
"required": [
"id",
"content",
"countLove",
"countComment",
"show"
]
},
"SimpleUser": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"companyId": {
"type": "integer",
"format": "int64",
"description": " 公司ID"
},
"companyName": {
"type": "string",
"description": " 公司名称"
},
"name": {
"type": "string",
"description": " 名称"
},
"avatar": {
"type": "string",
"description": " 头像"
},
"position": {
"type": "string",
"description": " 职位"
}
},
"title": "SimpleUser",
"required": [
"id",
"companyId",
"companyName",
"name",
"avatar",
"position"
]
},
"SystemArticleGetRequest": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64",
"description": "id"
},
"": {
"type": "integer",
"format": "int64"
}
},
"title": "SystemArticleGetRequest",
"required": [
"id"
]
},
"SystemArticleGetResponse": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64",
"description": " id"
},
"title": {
"type": "string",
"description": " 标题"
},
"authorId": {
"type": "integer",
"format": "int64",
"description": " 发布人id"
},
"author": {
"$ref": "#/definitions/Author",
"description": " 发布人"
},
"createdAt": {
"type": "integer",
"format": "int64",
"description": " 文章的发布时间"
},
"section": {
"type": "array",
"items": {
"$ref": "#/definitions/ArticleSection"
},
"description": " 文章的文本内容"
},
"images": {
"type": "array",
"items": {
"type": "string"
},
"description": " 图片"
},
"whoRead": {
"type": "array",
"items": {
"type": "integer",
"format": "int64"
},
"description": " 谁可查看"
},
"whoReadInfo": {
"type": "array",
"items": {
"$ref": "#/definitions/UserShowName"
},
"description": " 谁可查看"
},
"whoReview": {
"type": "array",
"items": {
"type": "integer",
"format": "int64"
},
"description": " 谁可评论"
},
"whoReviewInfo": {
"type": "array",
"items": {
"$ref": "#/definitions/UserShowName"
},
"description": " 谁可评论"
},
"location": {
"$ref": "#/definitions/Location",
"description": " 定位坐标"
},
"countLove": {
"type": "integer",
"format": "int32",
"description": " 点赞数量"
},
"countComment": {
"type": "integer",
"format": "int32",
"description": " 评论数量"
},
"countRead": {
"type": "integer",
"format": "int32",
"description": " 浏览数量"
},
"show": {
"type": "integer",
"format": "int32",
"description": " 评论的展示状态(0显示、1不显示)"
}
},
"title": "SystemArticleGetResponse",
"required": [
"id",
"title",
"authorId",
"author",
"createdAt",
"section",
"images",
"whoRead",
"whoReadInfo",
"whoReview",
"whoReviewInfo",
"location",
"countLove",
"countComment"
"countComment",
"countRead",
"show"
]
},
"SystemArticleSearch": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64",
"description": "id"
},
"title": {
"type": "string",
"description": "标题"
},
"author": {
"type": "string",
"description": "发布人"
},
"images": {
"type": "array",
"items": {
"type": "string"
},
"description": "图片"
},
"createdAt": {
"type": "integer",
"format": "int64",
"description": "文章的创建日期"
},
"countLove": {
"type": "integer",
"format": "int32",
"description": "点赞数量"
},
"CountComment": {
"type": "integer",
"format": "int32",
"description": "评论数量"
},
"show": {
"type": "integer",
"format": "int32",
"description": "是否隐藏 [0显示、1不显示]"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"description": "标签"
},
"targetUser": {
"type": "integer",
"format": "int32",
"description": "分发方式 [0分发给所有人、1分发给指定的人]"
}
},
"title": "SystemArticleSearch",
"required": [
"id",
"title",
"author",
"images",
"createdAt",
"countLove",
"CountComment",
"show",
"tags",
"targetUser"
]
},
"SystemArticleSearchRequest": {
"type": "object",
"properties": {
"": {
"type": "integer",
"format": "int64"
},
"page": {
"type": "integer",
"format": "int32"
},
"size": {
"type": "integer",
"format": "int32"
}
},
"title": "SystemArticleSearchRequest",
"required": [
"page",
"size"
]
},
"SystemArticleSearchResponse": {
"type": "object",
"properties": {
"total": {
"type": "integer",
"format": "int32"
},
"list": {
"type": "array",
"items": {
"$ref": "#/definitions/SystemArticleSearch"
}
}
},
"title": "SystemArticleSearchResponse",
"required": [
"total",
"list"
]
},
"TagCreateRequest": {
... ... @@ -2514,45 +3261,6 @@
"list"
]
},
"User": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"companyId": {
"type": "integer",
"format": "int64",
"description": " 公司ID"
},
"companyName": {
"type": "string",
"description": " 公司名称"
},
"name": {
"type": "string",
"description": " 名称"
},
"avatar": {
"type": "string",
"description": " 头像"
},
"position": {
"type": "string",
"description": " 职位"
}
},
"title": "User",
"required": [
"id",
"companyId",
"companyName",
"name",
"avatar",
"position"
]
},
"UserFollowItem": {
"type": "object",
"properties": {
... ... @@ -2731,6 +3439,24 @@
"total"
]
},
"UserShowName": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32"
},
"name": {
"type": "integer",
"format": "int32"
}
},
"title": "UserShowName",
"required": [
"id",
"name"
]
},
"WhichUserLikeArticle": {
"type": "object",
"properties": {
... ...
syntax = "v1"
import "article_type.api"
info(
title: "文章内容处理"
desc: "编辑处理文章内容"
... ...