You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

4439 lines
150 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# Generated with protoc-gen-openapi
# https://github.com/google/gnostic/tree/master/cmd/protoc-gen-openapi
openapi: 3.0.3
info:
title: ""
version: 0.0.1
paths:
/api/v1/article:
get:
tags:
- ArticleAPI
description: 获取文章
operationId: ArticleAPI_GetArticle
parameters:
- name: id
in: query
schema:
type: integer
format: int64
- name: identifier
in: query
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Article'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
put:
tags:
- ArticleAPI
description: 更新文章
operationId: ArticleAPI_UpdateArticle
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Article'
required: true
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
post:
tags:
- ArticleAPI
description: 创建文章
operationId: ArticleAPI_CreateArticle
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Article'
required: true
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
delete:
tags:
- ArticleAPI
description: 删除文章
operationId: ArticleAPI_DeleteArticle
parameters:
- name: id
in: query
schema:
type: array
items:
type: integer
format: int64
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/article/list:
get:
tags:
- ArticleAPI
description: 文章列表
operationId: ArticleAPI_ListArticle
parameters:
- name: page
in: query
schema:
type: integer
format: int64
- name: size
in: query
schema:
type: integer
format: int64
- name: wd
in: query
schema:
type: string
- name: field
in: query
schema:
type: array
items:
type: string
- name: order
in: query
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ListArticleReply'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/attachment:
get:
tags:
- AttachmentAPI
description: 查询附件
operationId: AttachmentAPI_GetAttachment
parameters:
- name: id
in: query
schema:
type: integer
format: int64
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Attachment'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
put:
tags:
- AttachmentAPI
description: 更新附件
operationId: AttachmentAPI_UpdateAttachment
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Attachment'
required: true
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
delete:
tags:
- AttachmentAPI
description: 删除附件。这里只是软删除不会真正删除附件默认24小时候会真正清除附件
operationId: AttachmentAPI_DeleteAttachment
parameters:
- name: id
in: query
schema:
type: array
items:
type: integer
format: int64
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/attachment/list:
get:
tags:
- AttachmentAPI
description: 列出附件
operationId: AttachmentAPI_ListAttachment
parameters:
- name: page
in: query
schema:
type: integer
format: int64
- name: size
in: query
schema:
type: integer
format: int64
- name: wd
in: query
schema:
type: string
- name: enable
in: query
schema:
type: array
items:
type: boolean
- name: userId
in: query
schema:
type: array
items:
type: integer
format: int64
- name: type
in: query
schema:
type: array
items:
type: integer
format: int64
- name: ext
in: query
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ListAttachmentReply'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/banner:
get:
tags:
- BannerAPI
description: 查询横幅
operationId: BannerAPI_GetBanner
parameters:
- name: id
in: query
schema:
type: integer
format: int64
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Banner'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
put:
tags:
- BannerAPI
description: 更新横幅
operationId: BannerAPI_UpdateBanner
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Banner'
required: true
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
post:
tags:
- BannerAPI
description: 创建横幅
operationId: BannerAPI_CreateBanner
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Banner'
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Banner'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
delete:
tags:
- BannerAPI
description: 删除横幅
operationId: BannerAPI_DeleteBanner
parameters:
- name: id
in: query
schema:
type: array
items:
type: integer
format: int64
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/banner/list:
get:
tags:
- BannerAPI
description: 横幅列表
operationId: BannerAPI_ListBanner
parameters:
- name: page
in: query
schema:
type: integer
format: int64
- name: size
in: query
schema:
type: integer
format: int64
- name: type
in: query
schema:
type: array
items:
type: integer
format: int32
- name: enable
in: query
schema:
type: array
items:
type: boolean
- name: wd
in: query
schema:
type: string
- name: field
in: query
schema:
type: array
items:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ListBannerReply'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/category:
get:
tags:
- CategoryAPI
description: 获取分类
operationId: CategoryAPI_GetCategory
parameters:
- name: id
in: query
schema:
type: integer
format: int64
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Category'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
put:
tags:
- CategoryAPI
description: 更新分类
operationId: CategoryAPI_UpdateCategory
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Category'
required: true
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
post:
tags:
- CategoryAPI
description: 创建分类
operationId: CategoryAPI_CreateCategory
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Category'
required: true
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
delete:
tags:
- CategoryAPI
description: 删除分类
operationId: CategoryAPI_DeleteCategory
parameters:
- name: id
in: query
schema:
type: array
items:
type: integer
format: int64
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/category/list:
get:
tags:
- CategoryAPI
description: 分类列表
operationId: CategoryAPI_ListCategory
parameters:
- name: page
in: query
schema:
type: integer
format: int64
- name: size
in: query
schema:
type: integer
format: int64
- name: parentId
in: query
schema:
type: array
items:
type: integer
format: int64
- name: wd
in: query
schema:
type: string
- name: enable
in: query
schema:
type: array
items:
type: boolean
- name: field
in: query
schema:
type: array
items:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ListCategoryReply'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/comment:
get:
tags:
- CommentAPI
description: 获取单个评论
operationId: CommentAPI_GetComment
parameters:
- name: id
in: query
schema:
type: integer
format: int64
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Comment'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
put:
tags:
- CommentAPI
description: 更新评论,仅限管理员操作
operationId: CommentAPI_UpdateComment
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Comment'
required: true
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
post:
tags:
- CommentAPI
description: 创建评论
operationId: CommentAPI_CreateComment
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateCommentRequest'
required: true
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
delete:
tags:
- CommentAPI
description: 管理员或用户自己删除自己的评论
operationId: CommentAPI_DeleteComment
parameters:
- name: id
in: query
schema:
type: array
items:
type: integer
format: int64
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/comment/check:
post:
tags:
- CommentAPI
description: 审核评论
operationId: CommentAPI_CheckComment
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CheckCommentRequest'
required: true
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/comment/list:
get:
tags:
- CommentAPI
description: 获取评论列表
operationId: CommentAPI_ListComment
parameters:
- name: page
in: query
schema:
type: integer
format: int64
- name: size
in: query
schema:
type: integer
format: int64
- name: wd
in: query
schema:
type: string
- name: field
in: query
schema:
type: array
items:
type: string
- name: order
in: query
schema:
type: string
- name: status
in: query
schema:
type: array
items:
type: integer
format: int32
- name: documentId
in: query
schema:
type: integer
format: int64
- name: userId
in: query
schema:
type: integer
format: int64
- name: parentId
in: query
schema:
type: array
items:
type: integer
format: int64
- name: withDocumentTitle
in: query
schema:
type: boolean
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ListCommentReply'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/config:
put:
tags:
- ConfigAPI
description: UpdateConfig 更新配置
operationId: ConfigAPI_UpdateConfig
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Configs'
required: true
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/config/list:
get:
tags:
- ConfigAPI
description: ListConfig 查询配置项
operationId: ConfigAPI_ListConfig
parameters:
- name: category
in: query
schema:
type: array
items:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Configs'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/document:
get:
tags:
- DocumentAPI
description: 查询文档
operationId: DocumentAPI_GetDocument
parameters:
- name: id
in: query
schema:
type: integer
format: int64
- name: withAuthor
in: query
schema:
type: boolean
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Document'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
put:
tags:
- DocumentAPI
description: 更新文档
operationId: DocumentAPI_UpdateDocument
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Document'
required: true
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
post:
tags:
- DocumentAPI
description: 创建文档
operationId: DocumentAPI_CreateDocument
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateDocumentRequest'
required: true
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
delete:
tags:
- DocumentAPI
description: 删除文档
operationId: DocumentAPI_DeleteDocument
parameters:
- name: id
in: query
schema:
type: array
items:
type: integer
format: int64
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/document/download:
get:
tags:
- DocumentAPI
description: 根据文档ID获取文档下载链接
operationId: DocumentAPI_DownloadDocument
parameters:
- name: id
in: query
schema:
type: integer
format: int64
- name: title
in: query
schema:
type: string
- name: keywords
in: query
schema:
type: string
- name: description
in: query
schema:
type: string
- name: userId
in: query
schema:
type: integer
format: int64
- name: cover
in: query
schema:
type: string
- name: width
in: query
schema:
type: integer
format: int32
- name: height
in: query
schema:
type: integer
format: int32
- name: preview
in: query
schema:
type: integer
format: int32
- name: pages
in: query
schema:
type: integer
format: int32
- name: uuid
in: query
schema:
type: string
- name: downloadCount
in: query
schema:
type: integer
format: int32
- name: viewCount
in: query
schema:
type: integer
format: int32
- name: favoriteCount
in: query
schema:
type: integer
format: int32
- name: commentCount
in: query
schema:
type: integer
format: int32
- name: score
in: query
schema:
type: integer
format: int32
- name: scoreCount
in: query
schema:
type: integer
format: int32
- name: price
in: query
schema:
type: integer
format: int32
- name: size
in: query
schema:
type: integer
format: int64
- name: status
in: query
schema:
type: integer
format: int32
- name: createdAt.seconds
in: query
description: Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.
schema:
type: integer
format: int64
- name: createdAt.nanos
in: query
description: Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive.
schema:
type: integer
format: int32
- name: updatedAt.seconds
in: query
description: Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.
schema:
type: integer
format: int64
- name: updatedAt.nanos
in: query
description: Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive.
schema:
type: integer
format: int32
- name: deletedAt.seconds
in: query
description: Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.
schema:
type: integer
format: int64
- name: deletedAt.nanos
in: query
description: Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive.
schema:
type: integer
format: int32
- name: recommendAt.seconds
in: query
description: Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.
schema:
type: integer
format: int64
- name: recommendAt.nanos
in: query
description: Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive.
schema:
type: integer
format: int32
- name: deletedUserId
in: query
schema:
type: integer
format: int64
- name: username
in: query
schema:
type: string
- name: categoryId
in: query
schema:
type: array
items:
type: integer
format: int64
- name: deletedUsername
in: query
schema:
type: string
- name: ext
in: query
schema:
type: string
- name: attachment.id
in: query
schema:
type: integer
format: int64
- name: attachment.hash
in: query
schema:
type: string
- name: attachment.userId
in: query
schema:
type: integer
format: int64
- name: attachment.typeId
in: query
schema:
type: integer
format: int64
- name: attachment.type
in: query
schema:
type: integer
format: int32
- name: attachment.enable
in: query
schema:
type: boolean
- name: attachment.path
in: query
schema:
type: string
- name: attachment.name
in: query
schema:
type: string
- name: attachment.size
in: query
schema:
type: integer
format: int64
- name: attachment.width
in: query
schema:
type: integer
format: int64
- name: attachment.height
in: query
schema:
type: integer
format: int64
- name: attachment.ext
in: query
schema:
type: string
- name: attachment.ip
in: query
schema:
type: string
- name: attachment.username
in: query
schema:
type: string
- name: attachment.typeName
in: query
schema:
type: string
- name: attachment.description
in: query
schema:
type: string
- name: attachment.createdAt.seconds
in: query
description: Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.
schema:
type: integer
format: int64
- name: attachment.createdAt.nanos
in: query
description: Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive.
schema:
type: integer
format: int32
- name: attachment.updatedAt.seconds
in: query
description: Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.
schema:
type: integer
format: int64
- name: attachment.updatedAt.nanos
in: query
description: Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive.
schema:
type: integer
format: int32
- name: user.loginAt.seconds
in: query
description: Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.
schema:
type: integer
format: int64
- name: user.loginAt.nanos
in: query
description: Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive.
schema:
type: integer
format: int32
- name: user.createdAt.seconds
in: query
description: Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.
schema:
type: integer
format: int64
- name: user.createdAt.nanos
in: query
description: Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive.
schema:
type: integer
format: int32
- name: user.id
in: query
schema:
type: integer
format: int64
- name: user.username
in: query
schema:
type: string
- name: user.mobile
in: query
schema:
type: string
- name: user.email
in: query
schema:
type: string
- name: user.address
in: query
schema:
type: string
- name: user.signature
in: query
schema:
type: string
- name: user.lastLoginIp
in: query
schema:
type: string
- name: user.registerIp
in: query
schema:
type: string
- name: user.docCount
in: query
schema:
type: integer
format: int32
- name: user.followCount
in: query
schema:
type: integer
format: int32
- name: user.fansCount
in: query
schema:
type: integer
format: int32
- name: user.favoriteCount
in: query
schema:
type: integer
format: int32
- name: user.commentCount
in: query
schema:
type: integer
format: int32
- name: user.status
in: query
schema:
type: integer
format: int32
- name: user.avatar
in: query
schema:
type: string
- name: user.identity
in: query
schema:
type: string
- name: user.realname
in: query
schema:
type: string
- name: user.groupId
in: query
schema:
type: array
items:
type: integer
format: int64
- name: user.creditCount
in: query
schema:
type: integer
format: int32
- name: enableGzip
in: query
schema:
type: boolean
- name: convertError
in: query
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/DownloadDocumentReply'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/document/home:
get:
tags:
- DocumentAPI
description: 针对首页的文档查询
operationId: DocumentAPI_ListDocumentForHome
parameters:
- name: limit
in: query
schema:
type: integer
format: int64
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ListDocumentForHomeResponse'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/document/list:
get:
tags:
- DocumentAPI
description: 文档列表查询
operationId: DocumentAPI_ListDocument
parameters:
- name: page
in: query
schema:
type: integer
format: int64
- name: size
in: query
schema:
type: integer
format: int64
- name: wd
in: query
schema:
type: string
- name: field
in: query
schema:
type: array
items:
type: string
- name: order
in: query
schema:
type: string
- name: categoryId
in: query
schema:
type: array
items:
type: integer
format: int64
- name: userId
in: query
schema:
type: array
items:
type: integer
format: int64
- name: status
in: query
schema:
type: array
items:
type: integer
format: int32
- name: isRecommend
in: query
schema:
type: array
items:
type: boolean
- name: limit
in: query
schema:
type: integer
format: int64
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ListDocumentReply'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/document/recommend:
put:
tags:
- DocumentAPI
description: 设置文档推荐
operationId: DocumentAPI_SetDocumentRecommend
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SetDocumentRecommendRequest'
required: true
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/document/reconvert:
put:
tags:
- DocumentAPI
description: 将文档一键设置为重转
operationId: DocumentAPI_SetDocumentReconvert
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/document/recycle:
get:
tags:
- RecycleAPI
description: 文档回收站列表
operationId: RecycleAPI_ListRecycleDocument
parameters:
- name: page
in: query
schema:
type: integer
format: int64
- name: size
in: query
schema:
type: integer
format: int64
- name: wd
in: query
schema:
type: string
- name: field
in: query
schema:
type: array
items:
type: string
- name: order
in: query
schema:
type: string
- name: categoryId
in: query
schema:
type: array
items:
type: integer
format: int64
- name: userId
in: query
schema:
type: array
items:
type: integer
format: int64
- name: status
in: query
schema:
type: array
items:
type: integer
format: int32
- name: isRecommend
in: query
schema:
type: array
items:
type: boolean
- name: limit
in: query
schema:
type: integer
format: int64
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ListDocumentReply'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
put:
tags:
- RecycleAPI
description: 恢复回收站文档,支持恢复单个文档或者是批量恢复
operationId: RecycleAPI_RecoverRecycleDocument
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/RecoverRecycleDocumentRequest'
required: true
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
delete:
tags:
- RecycleAPI
description: 删除回收站文档
operationId: RecycleAPI_DeleteRecycleDocument
parameters:
- name: id
in: query
schema:
type: array
items:
type: integer
format: int64
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/document/recycle/all:
delete:
tags:
- RecycleAPI
description: 清空回收站文档
operationId: RecycleAPI_ClearRecycleDocument
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/document/related:
get:
tags:
- DocumentAPI
description: 根据文档ID查询当前文档的相关文档
operationId: DocumentAPI_GetRelatedDocuments
parameters:
- name: id
in: query
schema:
type: integer
format: int64
- name: title
in: query
schema:
type: string
- name: keywords
in: query
schema:
type: string
- name: description
in: query
schema:
type: string
- name: userId
in: query
schema:
type: integer
format: int64
- name: cover
in: query
schema:
type: string
- name: width
in: query
schema:
type: integer
format: int32
- name: height
in: query
schema:
type: integer
format: int32
- name: preview
in: query
schema:
type: integer
format: int32
- name: pages
in: query
schema:
type: integer
format: int32
- name: uuid
in: query
schema:
type: string
- name: downloadCount
in: query
schema:
type: integer
format: int32
- name: viewCount
in: query
schema:
type: integer
format: int32
- name: favoriteCount
in: query
schema:
type: integer
format: int32
- name: commentCount
in: query
schema:
type: integer
format: int32
- name: score
in: query
schema:
type: integer
format: int32
- name: scoreCount
in: query
schema:
type: integer
format: int32
- name: price
in: query
schema:
type: integer
format: int32
- name: size
in: query
schema:
type: integer
format: int64
- name: status
in: query
schema:
type: integer
format: int32
- name: createdAt.seconds
in: query
description: Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.
schema:
type: integer
format: int64
- name: createdAt.nanos
in: query
description: Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive.
schema:
type: integer
format: int32
- name: updatedAt.seconds
in: query
description: Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.
schema:
type: integer
format: int64
- name: updatedAt.nanos
in: query
description: Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive.
schema:
type: integer
format: int32
- name: deletedAt.seconds
in: query
description: Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.
schema:
type: integer
format: int64
- name: deletedAt.nanos
in: query
description: Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive.
schema:
type: integer
format: int32
- name: recommendAt.seconds
in: query
description: Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.
schema:
type: integer
format: int64
- name: recommendAt.nanos
in: query
description: Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive.
schema:
type: integer
format: int32
- name: deletedUserId
in: query
schema:
type: integer
format: int64
- name: username
in: query
schema:
type: string
- name: categoryId
in: query
schema:
type: array
items:
type: integer
format: int64
- name: deletedUsername
in: query
schema:
type: string
- name: ext
in: query
schema:
type: string
- name: attachment.id
in: query
schema:
type: integer
format: int64
- name: attachment.hash
in: query
schema:
type: string
- name: attachment.userId
in: query
schema:
type: integer
format: int64
- name: attachment.typeId
in: query
schema:
type: integer
format: int64
- name: attachment.type
in: query
schema:
type: integer
format: int32
- name: attachment.enable
in: query
schema:
type: boolean
- name: attachment.path
in: query
schema:
type: string
- name: attachment.name
in: query
schema:
type: string
- name: attachment.size
in: query
schema:
type: integer
format: int64
- name: attachment.width
in: query
schema:
type: integer
format: int64
- name: attachment.height
in: query
schema:
type: integer
format: int64
- name: attachment.ext
in: query
schema:
type: string
- name: attachment.ip
in: query
schema:
type: string
- name: attachment.username
in: query
schema:
type: string
- name: attachment.typeName
in: query
schema:
type: string
- name: attachment.description
in: query
schema:
type: string
- name: attachment.createdAt.seconds
in: query
description: Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.
schema:
type: integer
format: int64
- name: attachment.createdAt.nanos
in: query
description: Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive.
schema:
type: integer
format: int32
- name: attachment.updatedAt.seconds
in: query
description: Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.
schema:
type: integer
format: int64
- name: attachment.updatedAt.nanos
in: query
description: Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive.
schema:
type: integer
format: int32
- name: user.loginAt.seconds
in: query
description: Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.
schema:
type: integer
format: int64
- name: user.loginAt.nanos
in: query
description: Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive.
schema:
type: integer
format: int32
- name: user.createdAt.seconds
in: query
description: Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.
schema:
type: integer
format: int64
- name: user.createdAt.nanos
in: query
description: Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive.
schema:
type: integer
format: int32
- name: user.id
in: query
schema:
type: integer
format: int64
- name: user.username
in: query
schema:
type: string
- name: user.mobile
in: query
schema:
type: string
- name: user.email
in: query
schema:
type: string
- name: user.address
in: query
schema:
type: string
- name: user.signature
in: query
schema:
type: string
- name: user.lastLoginIp
in: query
schema:
type: string
- name: user.registerIp
in: query
schema:
type: string
- name: user.docCount
in: query
schema:
type: integer
format: int32
- name: user.followCount
in: query
schema:
type: integer
format: int32
- name: user.fansCount
in: query
schema:
type: integer
format: int32
- name: user.favoriteCount
in: query
schema:
type: integer
format: int32
- name: user.commentCount
in: query
schema:
type: integer
format: int32
- name: user.status
in: query
schema:
type: integer
format: int32
- name: user.avatar
in: query
schema:
type: string
- name: user.identity
in: query
schema:
type: string
- name: user.realname
in: query
schema:
type: string
- name: user.groupId
in: query
schema:
type: array
items:
type: integer
format: int64
- name: user.creditCount
in: query
schema:
type: integer
format: int32
- name: enableGzip
in: query
schema:
type: boolean
- name: convertError
in: query
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ListDocumentReply'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/document/score:
get:
tags:
- DocumentAPI
description: 获取当前登录用户的文档评分
operationId: DocumentAPI_GetDocumentScore
parameters:
- name: id
in: query
schema:
type: integer
format: int64
- name: documentId
in: query
schema:
type: integer
format: int64
- name: userId
in: query
schema:
type: integer
format: int64
- name: score
in: query
schema:
type: integer
format: int32
- name: createdAt.seconds
in: query
description: Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.
schema:
type: integer
format: int64
- name: createdAt.nanos
in: query
description: Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive.
schema:
type: integer
format: int32
- name: updatedAt.seconds
in: query
description: Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.
schema:
type: integer
format: int64
- name: updatedAt.nanos
in: query
description: Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive.
schema:
type: integer
format: int32
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/DocumentScore'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
post:
tags:
- DocumentAPI
description: 设置文档评分
operationId: DocumentAPI_SetDocumentScore
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DocumentScore'
required: true
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/document/search:
get:
tags:
- DocumentAPI
description: 文档搜索
operationId: DocumentAPI_SearchDocument
parameters:
- name: page
in: query
schema:
type: integer
format: int32
- name: size
in: query
schema:
type: integer
format: int32
- name: wd
in: query
schema:
type: string
- name: categoryId
in: query
schema:
type: array
items:
type: integer
format: int64
- name: sort
in: query
schema:
type: string
- name: ext
in: query
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/SearchDocumentReply'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/envs:
get:
tags:
- ConfigAPI
description: 获取系统环境依赖检测
operationId: ConfigAPI_GetEnvs
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Envs'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/favorite:
get:
tags:
- FavoriteAPI
description: 根据文章id查询用户是否有收藏某篇文档
operationId: FavoriteAPI_GetFavorite
parameters:
- name: documentId
in: query
schema:
type: integer
format: int64
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Favorite'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
post:
tags:
- FavoriteAPI
description: 添加收藏
operationId: FavoriteAPI_CreateFavorite
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Favorite'
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Favorite'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
delete:
tags:
- FavoriteAPI
description: 取消收藏
operationId: FavoriteAPI_DeleteFavorite
parameters:
- name: id
in: query
schema:
type: array
items:
type: integer
format: int64
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/favorite/list:
get:
tags:
- FavoriteAPI
description: 查询用户的收藏
operationId: FavoriteAPI_ListFavorite
parameters:
- name: page
in: query
schema:
type: integer
format: int64
- name: size
in: query
schema:
type: integer
format: int64
- name: userId
in: query
schema:
type: integer
format: int64
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ListFavoriteReply'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/friendlink:
get:
tags:
- FriendlinkAPI
description: 获取友情链接
operationId: FriendlinkAPI_GetFriendlink
parameters:
- name: id
in: query
schema:
type: integer
format: int64
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Friendlink'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
put:
tags:
- FriendlinkAPI
description: 更新友情链接
operationId: FriendlinkAPI_UpdateFriendlink
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Friendlink'
required: true
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
post:
tags:
- FriendlinkAPI
description: 创建友情链接
operationId: FriendlinkAPI_CreateFriendlink
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Friendlink'
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Friendlink'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
delete:
tags:
- FriendlinkAPI
description: 删除友情链接
operationId: FriendlinkAPI_DeleteFriendlink
parameters:
- name: id
in: query
schema:
type: array
items:
type: integer
format: int64
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/friendlink/list:
get:
tags:
- FriendlinkAPI
description: 获取友情链接
operationId: FriendlinkAPI_ListFriendlink
parameters:
- name: page
in: query
schema:
type: integer
format: int32
- name: size
in: query
schema:
type: integer
format: int32
- name: wd
in: query
schema:
type: string
- name: enable
in: query
schema:
type: array
items:
type: boolean
- name: field
in: query
schema:
type: array
items:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ListFriendlinkReply'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/group:
get:
tags:
- GroupAPI
description: 获取用户组
operationId: GroupAPI_GetGroup
parameters:
- name: id
in: query
schema:
type: integer
format: int64
- name: title
in: query
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Group'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
put:
tags:
- GroupAPI
description: 更新用户组
operationId: GroupAPI_UpdateGroup
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Group'
required: true
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
post:
tags:
- GroupAPI
description: 创建用户组
operationId: GroupAPI_CreateGroup
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Group'
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Group'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
delete:
tags:
- GroupAPI
description: 删除用户组
operationId: GroupAPI_DeleteGroup
parameters:
- name: id
in: query
schema:
type: array
items:
type: integer
format: int64
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/group/list:
get:
tags:
- GroupAPI
description: 获取用户组列表
operationId: GroupAPI_ListGroup
parameters:
- name: wd
in: query
schema:
type: string
- name: page
in: query
schema:
type: integer
format: int64
- name: size
in: query
schema:
type: integer
format: int64
- name: sort
in: query
schema:
type: string
- name: field
in: query
schema:
type: array
items:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ListGroupReply'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/group/permission:
get:
tags:
- GroupAPI
description: 获取用户组权限列表
operationId: GroupAPI_GetGroupPermission
parameters:
- name: id
in: query
schema:
type: integer
format: int64
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/GroupPermissions'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
put:
tags:
- GroupAPI
description: 更新用户组权限,给用户组设置权限
operationId: GroupAPI_UpdateGroupPermission
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateGroupPermissionRequest'
required: true
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/permission:
get:
tags:
- PermissionAPI
description: 查询权限信息
operationId: PermissionAPI_GetPermission
parameters:
- name: id
in: query
schema:
type: integer
format: int64
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Permission'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
put:
tags:
- PermissionAPI
description: 更新权限信息。这里只能操作title和description
operationId: PermissionAPI_UpdatePermission
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Permission'
required: true
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/permission/list:
get:
tags:
- PermissionAPI
description: 查询权限列表
operationId: PermissionAPI_ListPermission
parameters:
- name: page
in: query
schema:
type: integer
format: int64
- name: size
in: query
schema:
type: integer
format: int64
- name: wd
in: query
schema:
type: string
- name: method
in: query
schema:
type: array
items:
type: string
- name: path
in: query
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ListPermissionReply'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/ping:
get:
tags:
- HealthAPI
operationId: HealthAPI_Ping
parameters:
- name: name
in: query
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/PongReply'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/report:
put:
tags:
- ReportAPI
description: 更新举报,审核举报内容
operationId: ReportAPI_UpdateReport
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Report'
required: true
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
post:
tags:
- ReportAPI
description: 创建举报
operationId: ReportAPI_CreateReport
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Report'
required: true
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
delete:
tags:
- ReportAPI
description: 删除举报
operationId: ReportAPI_DeleteReport
parameters:
- name: id
in: query
schema:
type: array
items:
type: integer
format: int64
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/report/list:
get:
tags:
- ReportAPI
description: 获取举报列表
operationId: ReportAPI_ListReport
parameters:
- name: page
in: query
schema:
type: integer
format: int64
- name: size
in: query
schema:
type: integer
format: int64
- name: wd
in: query
schema:
type: string
- name: field
in: query
schema:
type: array
items:
type: string
- name: order
in: query
schema:
type: string
- name: status
in: query
schema:
type: array
items:
type: boolean
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ListReportReply'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/settings:
get:
tags:
- ConfigAPI
description: 获取系统配置(针对所有用户,只读)
operationId: ConfigAPI_GetSettings
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Settings'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/sitemap:
put:
tags:
- ConfigAPI
description: 更新站点地图
operationId: ConfigAPI_UpdateSitemap
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/stats:
get:
tags:
- ConfigAPI
description: 获取系统配置
operationId: ConfigAPI_GetStats
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Stats'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/user:
get:
tags:
- UserAPI
description: 查询用户信息。如果传递了Id参数则表示查询用户的公开信息否则查询当前用户的私有信息
operationId: UserAPI_GetUser
parameters:
- name: id
in: query
schema:
type: integer
format: int64
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/User'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
put:
tags:
- UserAPI
description: 设置用户
operationId: UserAPI_SetUser
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SetUserRequest'
required: true
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
post:
tags:
- UserAPI
description: 新增用户
operationId: UserAPI_AddUser
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SetUserRequest'
required: true
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
delete:
tags:
- UserAPI
description: 删除用户。需要验证用户权限
operationId: UserAPI_DeleteUser
parameters:
- name: id
in: query
schema:
type: array
items:
type: integer
format: int64
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/user/caniuploaddocument:
get:
tags:
- UserAPI
description: 用户是否可以上传文档
operationId: UserAPI_CanIUploadDocument
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/user/captcha:
get:
tags:
- UserAPI
description: GetUserCaptcha 获取用户验证码
operationId: UserAPI_GetUserCaptcha
parameters:
- name: type
in: query
schema:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/GetUserCaptchaReply'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/user/dynamic:
get:
tags:
- UserAPI
description: 获取用户动态,包括获取关注的用户的动态
operationId: UserAPI_ListUserDynamic
parameters:
- name: page
in: query
schema:
type: integer
format: int64
- name: size
in: query
schema:
type: integer
format: int64
- name: id
in: query
schema:
type: integer
format: int64
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ListUserDynamicReply'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/user/findpassword/stepone:
post:
tags:
- UserAPI
description: 找回密码:第一步,发送验证码
operationId: UserAPI_FindPasswordStepOne
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/FindPasswordRequest'
required: true
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/user/findpassword/steptwo:
put:
tags:
- UserAPI
description: 找回密码:第二步,修改密码
operationId: UserAPI_FindPasswordStepTwo
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/FindPasswordRequest'
required: true
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/user/list:
get:
tags:
- UserAPI
description: |-
查询用户列表。对于非管理员,返回相应用户的公开信息;
对于管理员,返回相应用户的绝大部分信息
operationId: UserAPI_ListUser
parameters:
- name: page
in: query
schema:
type: integer
format: int64
- name: size
in: query
schema:
type: integer
format: int64
- name: wd
in: query
schema:
type: string
- name: sort
in: query
schema:
type: string
- name: id
in: query
schema:
type: array
items:
type: integer
format: int64
- name: groupId
in: query
schema:
type: array
items:
type: integer
format: int64
- name: status
in: query
schema:
type: array
items:
type: integer
format: int32
- name: limit
in: query
schema:
type: integer
format: int64
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ListUserReply'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/user/login:
post:
tags:
- UserAPI
description: 用户登录
operationId: UserAPI_Login
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/RegisterAndLoginRequest'
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/LoginReply'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/user/logout:
delete:
tags:
- UserAPI
description: 退出登录
operationId: UserAPI_Logout
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/user/password:
put:
tags:
- UserAPI
description: |-
更新用户密码。如果不传用户ID则表示更新当前用户的密码
如果穿了用户ID则表示更新指定用户的密码这时需要验证当前用户的权限
operationId: UserAPI_UpdateUserPassword
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateUserPasswordRequest'
required: true
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/user/permission:
get:
tags:
- UserAPI
description: GetUserCaptcha 获取用户验证码
operationId: UserAPI_GetUserPermissions
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/GetUserPermissionsReply'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/user/profile:
put:
tags:
- UserAPI
description: |-
更新用户密码。如果不传用户ID则表示更新当前用户的密码
如果穿了用户ID则表示更新指定用户的密码这时需要验证当前用户的权限
operationId: UserAPI_UpdateUserProfile
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/User'
required: true
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/user/register:
post:
tags:
- UserAPI
description: 用户注册
operationId: UserAPI_Register
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/RegisterAndLoginRequest'
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/LoginReply'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/api/v1/user/sign:
get:
tags:
- UserAPI
description: 获取今日已签到记录
operationId: UserAPI_GetSignedToday
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Sign'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
put:
tags:
- UserAPI
description: 每日签到
operationId: UserAPI_SignToday
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Sign'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/health:
get:
tags:
- HealthAPI
operationId: HealthAPI_Health
responses:
"200":
description: OK
content: {}
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
components:
schemas:
Article:
type: object
properties:
id:
type: integer
format: int64
identifier:
type: string
author:
type: string
viewCount:
type: integer
format: int64
title:
type: string
keywords:
type: string
description:
type: string
content:
type: string
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time
description: 文章
Attachment:
type: object
properties:
id:
type: integer
format: int64
hash:
type: string
userId:
type: integer
format: int64
typeId:
type: integer
format: int64
type:
type: integer
format: int32
enable:
type: boolean
path:
type: string
name:
type: string
size:
type: integer
format: int64
width:
type: integer
format: int64
height:
type: integer
format: int64
ext:
type: string
ip:
type: string
username:
type: string
typeName:
type: string
description:
type: string
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time
description: 附件
Banner:
type: object
properties:
id:
type: integer
format: int64
title:
type: string
path:
type: string
sort:
type: integer
format: int32
enable:
type: boolean
type:
type: integer
format: int32
url:
type: string
description:
type: string
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time
description: banner轮播图
Category:
type: object
properties:
id:
type: integer
format: int32
parentId:
type: integer
format: int32
title:
type: string
docCount:
type: integer
format: int32
sort:
type: integer
format: int32
enable:
type: boolean
cover:
type: string
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time
description: 文档分类
CheckCommentRequest:
type: object
properties:
id:
type: array
items:
type: integer
format: int64
status:
type: integer
format: int32
description: 审核评论,修改评论状态
Comment:
type: object
properties:
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time
id:
type: integer
format: int64
parentId:
type: integer
format: int64
content:
type: string
documentId:
type: integer
format: int64
status:
type: integer
format: int32
commentCount:
type: integer
format: int32
userId:
type: integer
format: int64
user:
$ref: '#/components/schemas/User'
documentTitle:
type: string
description: 评论
Config:
type: object
properties:
id:
type: integer
format: int64
label:
type: string
name:
type: string
value:
type: string
placeholder:
type: string
inputType:
type: string
category:
type: string
sort:
type: integer
format: int32
options:
type: string
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time
description: 配置
ConfigFooter:
type: object
properties:
about:
type: string
contact:
type: string
agreement:
type: string
copyright:
type: string
feedback:
type: string
description: 底链配置项,为跳转的链接地址
ConfigSecurity:
type: object
properties:
isClose:
type: boolean
closeStatement:
type: string
enableRegister:
type: boolean
enableCaptchaLogin:
type: boolean
enableCaptchaRegister:
type: boolean
enableCaptchaComment:
type: boolean
enableCaptchaFindPassword:
type: boolean
enableCaptchaUpload:
type: boolean
maxDocumentSize:
type: integer
format: int32
documentAllowedExt:
type: array
items:
type: string
loginRequired:
type: boolean
description: 安全配置
ConfigSystem:
type: object
properties:
domain:
type: string
title:
type: string
keywords:
type: string
description:
type: string
logo:
type: string
favicon:
type: string
icp:
type: string
analytics:
type: string
sitename:
type: string
copyrightStartYear:
type: string
registerBackground:
type: string
loginBackground:
type: string
recommendWords:
type: array
items:
type: string
version:
type: string
description: 系统配置项
Configs:
type: object
properties:
config:
type: array
items:
$ref: '#/components/schemas/Config'
description: 配置列表
CreateCommentRequest:
type: object
properties:
documentId:
type: integer
format: int64
parentId:
type: integer
format: int64
content:
type: string
captchaId:
type: string
captcha:
type: string
description: 创建评论请求
CreateDocumentItem:
type: object
properties:
title:
type: string
attachmentId:
type: integer
format: int64
price:
type: integer
format: int32
description: 创建文档
CreateDocumentRequest:
type: object
properties:
overwrite:
type: boolean
categoryId:
type: array
items:
type: integer
format: int64
document:
type: array
items:
$ref: '#/components/schemas/CreateDocumentItem'
description: 创建文档
Document:
type: object
properties:
id:
type: integer
format: int64
title:
type: string
keywords:
type: string
description:
type: string
userId:
type: integer
format: int64
cover:
type: string
width:
type: integer
format: int32
height:
type: integer
format: int32
preview:
type: integer
format: int32
pages:
type: integer
format: int32
uuid:
type: string
downloadCount:
type: integer
format: int32
viewCount:
type: integer
format: int32
favoriteCount:
type: integer
format: int32
commentCount:
type: integer
format: int32
score:
type: integer
format: int32
scoreCount:
type: integer
format: int32
price:
type: integer
format: int32
size:
type: integer
format: int64
status:
type: integer
format: int32
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time
deletedAt:
type: string
format: date-time
recommendAt:
type: string
format: date-time
deletedUserId:
type: integer
format: int64
username:
type: string
categoryId:
type: array
items:
type: integer
format: int64
deletedUsername:
type: string
ext:
type: string
attachment:
$ref: '#/components/schemas/Attachment'
user:
$ref: '#/components/schemas/User'
enableGzip:
type: boolean
convertError:
type: string
description: 文档
DocumentScore:
type: object
properties:
id:
type: integer
format: int64
documentId:
type: integer
format: int64
userId:
type: integer
format: int64
score:
type: integer
format: int32
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time
description: 文档评分
DownloadDocumentReply:
type: object
properties:
url:
type: string
description: 文档下载
Dynamic:
type: object
properties:
id:
type: integer
format: int64
userId:
type: integer
format: int64
content:
type: string
type:
type: integer
format: int32
username:
type: string
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time
description: 用户动态
EnvDependent:
type: object
properties:
name:
type: string
description:
type: string
isInstalled:
type: boolean
error:
type: string
checkedAt:
type: string
format: date-time
cmd:
type: string
isRequired:
type: boolean
description: 依赖项
Envs:
type: object
properties:
envs:
type: array
items:
$ref: '#/components/schemas/EnvDependent'
description: 依赖项列表
Favorite:
type: object
properties:
id:
type: integer
format: int64
userId:
type: integer
format: int64
documentId:
type: integer
format: int64
title:
type: string
ext:
type: string
score:
type: integer
format: int32
size:
type: integer
format: int64
pages:
type: integer
format: int32
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time
description: 文档收藏
FindPasswordRequest:
type: object
properties:
email:
type: string
token:
type: string
password:
type: string
captcha:
type: string
captchaId:
type: string
description: 找回密码
Friendlink:
type: object
properties:
id:
type: integer
format: int32
title:
type: string
link:
type: string
description:
type: string
sort:
type: integer
format: int32
enable:
type: boolean
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time
description: 友情链接
GetUserCaptchaReply:
type: object
properties:
enable:
type: boolean
id:
type: string
captcha:
type: string
type:
type: string
description: 验证码响应
GetUserPermissionsReply:
type: object
properties:
permission:
type: array
items:
$ref: '#/components/schemas/Permission'
description: 用户权限信息查询
GoogleProtobufAny:
type: object
properties:
'@type':
type: string
description: The type of the serialized message.
additionalProperties: true
description: Contains an arbitrary serialized message along with a @type that describes the type of the serialized message.
Group:
type: object
properties:
id:
type: integer
format: int64
title:
type: string
color:
type: string
isDefault:
type: boolean
isDisplay:
type: boolean
description:
type: string
userCount:
type: integer
format: int32
sort:
type: integer
format: int32
enableUpload:
type: boolean
enableCommentApproval:
type: boolean
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time
description: 用户组,角色
GroupPermissions:
type: object
properties:
permissionId:
type: array
items:
type: integer
format: int64
description: 用户组权限
ListArticleReply:
type: object
properties:
total:
type: integer
format: int64
article:
type: array
items:
$ref: '#/components/schemas/Article'
description: 文章列表响应
ListAttachmentReply:
type: object
properties:
total:
type: integer
format: int64
attachment:
type: array
items:
$ref: '#/components/schemas/Attachment'
description: 列出附件响应
ListBannerReply:
type: object
properties:
total:
type: integer
format: int64
banner:
type: array
items:
$ref: '#/components/schemas/Banner'
description: 横幅列表
ListCategoryReply:
type: object
properties:
total:
type: integer
format: int64
category:
type: array
items:
$ref: '#/components/schemas/Category'
description: 分类列表响应
ListCommentReply:
type: object
properties:
total:
type: integer
format: int64
comment:
type: array
items:
$ref: '#/components/schemas/Comment'
description: 获取评论列表响应
ListDocumentForHomeItem:
type: object
properties:
categoryId:
type: integer
format: int64
categoryCover:
type: string
categoryName:
type: string
document:
type: array
items:
$ref: '#/components/schemas/Document'
description: 首页文档查询返回项
ListDocumentForHomeResponse:
type: object
properties:
document:
type: array
items:
$ref: '#/components/schemas/ListDocumentForHomeItem'
description: 查询文档(针对首页的查询)
ListDocumentReply:
type: object
properties:
total:
type: integer
format: int64
document:
type: array
items:
$ref: '#/components/schemas/Document'
description: 文档列表
ListFavoriteReply:
type: object
properties:
total:
type: integer
format: int64
favorite:
type: array
items:
$ref: '#/components/schemas/Favorite'
description: 查询用户的收藏
ListFriendlinkReply:
type: object
properties:
friendlink:
type: array
items:
$ref: '#/components/schemas/Friendlink'
total:
type: integer
format: int64
description: 友情链接列表
ListGroupReply:
type: object
properties:
group:
type: array
items:
$ref: '#/components/schemas/Group'
total:
type: integer
format: int64
description: 用户组列表
ListPermissionReply:
type: object
properties:
total:
type: integer
format: int64
permission:
type: array
items:
$ref: '#/components/schemas/Permission'
description: 权限列表响应
ListReportReply:
type: object
properties:
total:
type: integer
format: int64
report:
type: array
items:
$ref: '#/components/schemas/Report'
description: 举报列表响应
ListUserDynamicReply:
type: object
properties:
total:
type: integer
format: int64
dynamic:
type: array
items:
$ref: '#/components/schemas/Dynamic'
description: 用户动态列表响应
ListUserReply:
type: object
properties:
total:
type: integer
format: int64
user:
type: array
items:
$ref: '#/components/schemas/User'
description: 用户列表响应
LoginReply:
type: object
properties:
token:
type: string
user:
$ref: '#/components/schemas/User'
description: 用户登录响应
Permission:
type: object
properties:
id:
type: integer
format: int64
method:
type: string
path:
type: string
title:
type: string
description:
type: string
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time
description: 权限
PongReply:
type: object
properties:
name:
type: string
createdAt:
type: string
format: date-time
RecoverRecycleDocumentRequest:
type: object
properties:
id:
type: array
items:
type: integer
format: int64
description: 恢复文档
RegisterAndLoginRequest:
type: object
properties:
username:
type: string
password:
type: string
captcha:
type: string
captchaId:
type: string
email:
type: string
description: 用户注册登录请求
Report:
type: object
properties:
id:
type: integer
format: int64
documentId:
type: integer
format: int64
userId:
type: integer
format: int64
reason:
type: integer
format: int32
status:
type: boolean
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time
documentTitle:
type: string
remark:
type: string
username:
type: string
description: 举报
SearchDocumentReply:
type: object
properties:
total:
type: integer
format: int64
spend:
type: string
document:
type: array
items:
$ref: '#/components/schemas/Document'
description: 文档搜索响应
SetDocumentRecommendRequest:
type: object
properties:
id:
type: array
items:
type: integer
format: int64
type:
type: integer
format: int32
description: 设置文档推荐
SetUserRequest:
type: object
properties:
id:
type: integer
format: int64
username:
type: string
password:
type: string
groupId:
type: array
items:
type: integer
format: int64
email:
type: string
description: 管理后台设置用户信息
Settings:
type: object
properties:
system:
$ref: '#/components/schemas/ConfigSystem'
footer:
$ref: '#/components/schemas/ConfigFooter'
security:
$ref: '#/components/schemas/ConfigSecurity'
description: 系统配置
Sign:
type: object
properties:
id:
type: integer
format: int64
userId:
type: integer
format: int64
signAt:
type: integer
format: int32
ip:
type: string
createdAt:
type: string
format: date-time
award:
type: integer
format: int32
description: 用户签到
Stats:
type: object
properties:
userCount:
type: integer
format: int64
documentCount:
type: integer
format: int64
categoryCount:
type: integer
format: int64
articleCount:
type: integer
format: int64
commentCount:
type: integer
format: int64
bannerCount:
type: integer
format: int64
friendlinkCount:
type: integer
format: int64
os:
type: string
version:
type: string
hash:
type: string
buildAt:
type: string
reportCount:
type: integer
format: int64
description: 系统状态
Status:
type: object
properties:
code:
type: integer
description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
format: int32
message:
type: string
description: A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
details:
type: array
items:
$ref: '#/components/schemas/GoogleProtobufAny'
description: A list of messages that carry the error details. There is a common set of message types for APIs to use.
description: 'The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).'
UpdateGroupPermissionRequest:
type: object
properties:
groupId:
type: integer
format: int64
permissionId:
type: array
items:
type: integer
format: int64
description: 更新用户组权限
UpdateUserPasswordRequest:
type: object
properties:
id:
type: integer
format: int64
oldPassword:
type: string
newPassword:
type: string
description: 修改用户密码
User:
type: object
properties:
loginAt:
type: string
format: date-time
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time
id:
type: integer
format: int64
username:
type: string
mobile:
type: string
email:
type: string
address:
type: string
signature:
type: string
lastLoginIp:
type: string
registerIp:
type: string
docCount:
type: integer
format: int32
followCount:
type: integer
format: int32
fansCount:
type: integer
format: int32
favoriteCount:
type: integer
format: int32
commentCount:
type: integer
format: int32
status:
type: integer
format: int32
avatar:
type: string
identity:
type: string
realname:
type: string
groupId:
type: array
items:
type: integer
format: int64
creditCount:
type: integer
format: int32
description: 用户信息
tags:
- name: ArticleAPI
description: 文章API服务
- name: AttachmentAPI
description: 附件服务。只有管理员才有权限操作
- name: BannerAPI
description: 横幅API服务
- name: CategoryAPI
description: 文档分类API服务
- name: CommentAPI
description: 评论服务
- name: ConfigAPI
description: 配置服务
- name: DocumentAPI
description: 文档服务
- name: FavoriteAPI
- name: FriendlinkAPI
description: 友情链接服务
- name: GroupAPI
- name: HealthAPI
- name: PermissionAPI
description: 权限API服务
- name: RecycleAPI
- name: ReportAPI
description: 举报服务
- name: UserAPI