mirror of
https://github.com/usememos/memos.git
synced 2024-12-26 07:01:17 +08:00
docs: regenerate swagger
This commit is contained in:
parent
fa17dce046
commit
dd9ee44a1f
7 changed files with 3363 additions and 1917 deletions
|
@ -838,7 +838,7 @@ const docTemplate = `{
|
|||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/api_v1.UpsertMemoRelationRequest"
|
||||
"$ref": "#/definitions/github_com_usememos_memos_api_v1.UpsertMemoRelationRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -992,7 +992,7 @@ const docTemplate = `{
|
|||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/github_com_usememos_memos_api_v1.CreateResourceRequest"
|
||||
"$ref": "#/definitions/api_v1.CreateResourceRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -1116,7 +1116,7 @@ const docTemplate = `{
|
|||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/github_com_usememos_memos_api_v1.UpdateResourceRequest"
|
||||
"$ref": "#/definitions/api_v1.UpdateResourceRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -1155,7 +1155,7 @@ const docTemplate = `{
|
|||
"200": {
|
||||
"description": "System GetSystemStatus",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/github_com_usememos_memos_api_v1.SystemStatus"
|
||||
"$ref": "#/definitions/api_v1.SystemStatus"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
|
@ -1212,7 +1212,7 @@ const docTemplate = `{
|
|||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/github_com_usememos_memos_api_v1.CreateStorageRequest"
|
||||
"$ref": "#/definitions/api_v1.CreateStorageRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -1293,7 +1293,7 @@ const docTemplate = `{
|
|||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/github_com_usememos_memos_api_v1.UpdateStorageRequest"
|
||||
"$ref": "#/definitions/api_v1.UpdateStorageRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -1799,25 +1799,6 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
},
|
||||
"/explore/rss.xml": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"text/xml"
|
||||
],
|
||||
"tags": [
|
||||
"rss"
|
||||
],
|
||||
"summary": "Get RSS",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "RSS"
|
||||
},
|
||||
"500": {
|
||||
"description": "Failed to get system customized profile | Failed to find memo list | Failed to generate rss"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/o/get/GetImage": {
|
||||
"get": {
|
||||
"produces": [
|
||||
|
@ -1848,37 +1829,6 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/u/{id}/rss.xml": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"text/xml"
|
||||
],
|
||||
"tags": [
|
||||
"rss"
|
||||
],
|
||||
"summary": "Get RSS for a user",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "User ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "RSS"
|
||||
},
|
||||
"400": {
|
||||
"description": "User id is not a number"
|
||||
},
|
||||
"500": {
|
||||
"description": "Failed to get system customized profile | Failed to find memo list | Failed to generate rss"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
|
@ -2228,6 +2178,9 @@ const docTemplate = `{
|
|||
"path": {
|
||||
"type": "string"
|
||||
},
|
||||
"presign": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"region": {
|
||||
"type": "string"
|
||||
},
|
||||
|
@ -2859,6 +2812,9 @@ const docTemplate = `{
|
|||
"path": {
|
||||
"type": "string"
|
||||
},
|
||||
"presign": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"region": {
|
||||
"type": "string"
|
||||
},
|
||||
|
@ -3253,10 +3209,16 @@ const docTemplate = `{
|
|||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"parentID": {
|
||||
"type": "integer"
|
||||
},
|
||||
"pinned": {
|
||||
"description": "Composed fields",
|
||||
"type": "boolean"
|
||||
},
|
||||
"resourceName": {
|
||||
"type": "string"
|
||||
},
|
||||
"rowStatus": {
|
||||
"description": "Standard fields",
|
||||
"allOf": [
|
||||
|
@ -3330,6 +3292,9 @@ const docTemplate = `{
|
|||
"memoID": {
|
||||
"type": "integer"
|
||||
},
|
||||
"resourceName": {
|
||||
"type": "string"
|
||||
},
|
||||
"size": {
|
||||
"type": "integer"
|
||||
},
|
||||
|
|
1719
api/v1/swagger.md
Normal file
1719
api/v1/swagger.md
Normal file
File diff suppressed because it is too large
Load diff
|
@ -230,6 +230,8 @@ definitions:
|
|||
type: string
|
||||
path:
|
||||
type: string
|
||||
presign:
|
||||
type: boolean
|
||||
region:
|
||||
type: string
|
||||
secretKey:
|
||||
|
@ -238,8 +240,6 @@ definitions:
|
|||
type: string
|
||||
urlSuffix:
|
||||
type: string
|
||||
presign:
|
||||
type: boolean
|
||||
type: object
|
||||
api_v1.StorageType:
|
||||
enum:
|
||||
|
@ -662,6 +662,8 @@ definitions:
|
|||
type: string
|
||||
path:
|
||||
type: string
|
||||
presign:
|
||||
type: boolean
|
||||
region:
|
||||
type: string
|
||||
secretKey:
|
||||
|
@ -670,8 +672,6 @@ definitions:
|
|||
type: string
|
||||
urlSuffix:
|
||||
type: string
|
||||
presign:
|
||||
type: boolean
|
||||
type: object
|
||||
github_com_usememos_memos_api_v1.StorageType:
|
||||
enum:
|
||||
|
@ -936,9 +936,13 @@ definitions:
|
|||
type: integer
|
||||
id:
|
||||
type: integer
|
||||
parentID:
|
||||
type: integer
|
||||
pinned:
|
||||
description: Composed fields
|
||||
type: boolean
|
||||
resourceName:
|
||||
type: string
|
||||
rowStatus:
|
||||
allOf:
|
||||
- $ref: '#/definitions/store.RowStatus'
|
||||
|
@ -987,6 +991,8 @@ definitions:
|
|||
type: string
|
||||
memoID:
|
||||
type: integer
|
||||
resourceName:
|
||||
type: string
|
||||
size:
|
||||
type: integer
|
||||
type:
|
||||
|
@ -1587,7 +1593,7 @@ paths:
|
|||
name: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/api_v1.UpsertMemoRelationRequest'
|
||||
$ref: '#/definitions/github_com_usememos_memos_api_v1.UpsertMemoRelationRequest'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
|
@ -1747,7 +1753,7 @@ paths:
|
|||
name: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/github_com_usememos_memos_api_v1.CreateResourceRequest'
|
||||
$ref: '#/definitions/api_v1.CreateResourceRequest'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
|
@ -1805,7 +1811,7 @@ paths:
|
|||
name: patch
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/github_com_usememos_memos_api_v1.UpdateResourceRequest'
|
||||
$ref: '#/definitions/api_v1.UpdateResourceRequest'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
|
@ -1860,7 +1866,7 @@ paths:
|
|||
"200":
|
||||
description: System GetSystemStatus
|
||||
schema:
|
||||
$ref: '#/definitions/github_com_usememos_memos_api_v1.SystemStatus'
|
||||
$ref: '#/definitions/api_v1.SystemStatus'
|
||||
"401":
|
||||
description: Missing user in session | Unauthorized
|
||||
"500":
|
||||
|
@ -1896,7 +1902,7 @@ paths:
|
|||
name: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/github_com_usememos_memos_api_v1.CreateStorageRequest'
|
||||
$ref: '#/definitions/api_v1.CreateStorageRequest'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
|
@ -1951,7 +1957,7 @@ paths:
|
|||
name: patch
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/github_com_usememos_memos_api_v1.UpdateStorageRequest'
|
||||
$ref: '#/definitions/api_v1.UpdateStorageRequest'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
|
@ -2287,19 +2293,6 @@ paths:
|
|||
summary: Get user by username
|
||||
tags:
|
||||
- user
|
||||
/explore/rss.xml:
|
||||
get:
|
||||
produces:
|
||||
- text/xml
|
||||
responses:
|
||||
"200":
|
||||
description: RSS
|
||||
"500":
|
||||
description: Failed to get system customized profile | Failed to find memo
|
||||
list | Failed to generate rss
|
||||
summary: Get RSS
|
||||
tags:
|
||||
- rss
|
||||
/o/get/GetImage:
|
||||
get:
|
||||
parameters:
|
||||
|
@ -2321,25 +2314,4 @@ paths:
|
|||
summary: Get GetImage from URL
|
||||
tags:
|
||||
- image-url
|
||||
/u/{id}/rss.xml:
|
||||
get:
|
||||
parameters:
|
||||
- description: User ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
produces:
|
||||
- text/xml
|
||||
responses:
|
||||
"200":
|
||||
description: RSS
|
||||
"400":
|
||||
description: User id is not a number
|
||||
"500":
|
||||
description: Failed to get system customized profile | Failed to find memo
|
||||
list | Failed to generate rss
|
||||
summary: Get RSS for a user
|
||||
tags:
|
||||
- rss
|
||||
swagger: "2.0"
|
||||
|
|
1606
api/v2/apidocs.swagger.md
Normal file
1606
api/v2/apidocs.swagger.md
Normal file
File diff suppressed because it is too large
Load diff
1816
docs/api/v1.md
1816
docs/api/v1.md
File diff suppressed because it is too large
Load diff
|
@ -20,7 +20,7 @@ plugins:
|
|||
- paths=source_relative
|
||||
- plugin: buf.build/grpc-ecosystem/openapiv2:v2.19.0
|
||||
out: ../api/v2/
|
||||
opt: output_format=yaml,allow_merge=true,merge_file_name=v2
|
||||
opt: output_format=yaml,allow_merge=true
|
||||
# Build the TypeScript definitions for the web.
|
||||
- plugin: buf.build/community/stephenh-ts-proto:v1.152.1
|
||||
out: ../web/src/types/proto
|
||||
|
|
Loading…
Reference in a new issue