From 8c6682bd77b387bd2df6a2f13635c669d83b9f23 Mon Sep 17 00:00:00 2001 From: johnnyjoy Date: Mon, 2 Sep 2024 20:50:59 +0800 Subject: [PATCH] chore: regenerate apidocs --- docs/apidocs.swagger.yaml | 265 +++++------------- .../components/MemoContent/MermaidBlock.tsx | 4 +- 2 files changed, 65 insertions(+), 204 deletions(-) diff --git a/docs/apidocs.swagger.yaml b/docs/apidocs.swagger.yaml index cb94606e..c01f6b85 100644 --- a/docs/apidocs.swagger.yaml +++ b/docs/apidocs.swagger.yaml @@ -300,16 +300,12 @@ paths: type: integer format: int32 - name: pageToken - description: |- - A page token, received from a previous `ListMemos` call. - Provide this to retrieve the subsequent page. + description: "A page token, received from a previous `ListMemos` call.\r\nProvide this to retrieve the subsequent page." in: query required: false type: string - name: filter - description: |- - Filter is used to filter memos returned in the list. - Format: "creator == 'users/{uid}' && visibilities == ['PUBLIC', 'PROTECTED']" + description: "Filter is used to filter memos returned in the list.\r\nFormat: \"creator == 'users/{uid}' && visibilities == ['PUBLIC', 'PROTECTED']\"" in: query required: false type: string @@ -484,9 +480,7 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: filter - description: |- - Filter is used to filter users returned in the list. - Format: "username == 'frank'" + description: "Filter is used to filter users returned in the list.\r\nFormat: \"username == 'frank'\"" in: query required: false type: string @@ -647,9 +641,7 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name - description: |- - The resource name of the workspace setting. - Format: settings/{setting} + description: "The resource name of the workspace setting.\r\nFormat: settings/{setting}" in: path required: true type: string @@ -671,9 +663,7 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: setting.name - description: |- - name is the name of the setting. - Format: settings/{setting} + description: "name is the name of the setting.\r\nFormat: settings/{setting}" in: path required: true type: string @@ -709,9 +699,7 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: identityProvider.name - description: |- - The name of the identityProvider. - Format: identityProviders/{id} + description: "The name of the identityProvider.\r\nFormat: identityProviders/{id}" in: path required: true type: string @@ -749,9 +737,7 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: inbox.name - description: |- - The name of the inbox. - Format: inboxes/{id} + description: "The name of the inbox.\r\nFormat: inboxes/{id}" in: path required: true type: string @@ -795,10 +781,7 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: memo.name - description: |- - The name of the memo. - Format: memos/{id} - id is the system generated id. + description: "The name of the memo.\r\nFormat: memos/{id}\r\nid is the system generated id." in: path required: true type: string @@ -816,9 +799,7 @@ paths: $ref: '#/definitions/v1RowStatus' creator: type: string - title: |- - The name of the creator. - Format: users/{id} + title: "The name of the creator.\r\nFormat: users/{id}" createTime: type: string format: date-time @@ -871,9 +852,7 @@ paths: readOnly: true parent: type: string - title: |- - The name of the parent memo. - Format: memos/{id} + title: "The name of the parent memo.\r\nFormat: memos/{id}" readOnly: true snippet: type: string @@ -895,9 +874,7 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name_1 - description: |- - The name of the user. - Format: users/{id} + description: "The name of the user.\r\nFormat: users/{id}" in: path required: true type: string @@ -919,9 +896,7 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name_1 - description: |- - The name of the identityProvider to delete. - Format: identityProviders/{id} + description: "The name of the identityProvider to delete.\r\nFormat: identityProviders/{id}" in: path required: true type: string @@ -943,9 +918,7 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name_2 - description: |- - The name of the identityProvider to get. - Format: identityProviders/{id} + description: "The name of the identityProvider to get.\r\nFormat: identityProviders/{id}" in: path required: true type: string @@ -967,9 +940,7 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name_2 - description: |- - The name of the inbox to delete. - Format: inboxes/{id} + description: "The name of the inbox to delete.\r\nFormat: inboxes/{id}" in: path required: true type: string @@ -991,10 +962,7 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name_3 - description: |- - The name of the resource. - Format: resources/{id} - id is the system generated unique identifier. + description: "The name of the resource.\r\nFormat: resources/{id}\r\nid is the system generated unique identifier." in: path required: true type: string @@ -1016,10 +984,7 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name_3 - description: |- - The name of the resource. - Format: resources/{id} - id is the system generated unique identifier. + description: "The name of the resource.\r\nFormat: resources/{id}\r\nid is the system generated unique identifier." in: path required: true type: string @@ -1041,9 +1006,7 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name_4 - description: |- - The name of the memo. - Format: memos/{id} + description: "The name of the memo.\r\nFormat: memos/{id}" in: path required: true type: string @@ -1065,9 +1028,7 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name_4 - description: |- - The name of the memo. - Format: memos/{id} + description: "The name of the memo.\r\nFormat: memos/{id}" in: path required: true type: string @@ -1089,9 +1050,7 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name - description: |- - The name of the activity. - Format: activities/{id} + description: "The name of the activity.\r\nFormat: activities/{id}" in: path required: true type: string @@ -1113,9 +1072,7 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name - description: |- - The name of the user. - Format: users/{id} + description: "The name of the user.\r\nFormat: users/{id}" in: path required: true type: string @@ -1137,9 +1094,7 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name - description: |- - The name of the user. - Format: users/{id} + description: "The name of the user.\r\nFormat: users/{id}" in: path required: true type: string @@ -1160,9 +1115,7 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name - description: |- - The name of the user. - Format: users/{id} + description: "The name of the user.\r\nFormat: users/{id}" in: path required: true type: string @@ -1190,9 +1143,7 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name - description: |- - The name of the user. - Format: users/{id} + description: "The name of the user.\r\nFormat: users/{id}" in: path required: true type: string @@ -1219,9 +1170,7 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name - description: |- - The name of the memo. - Format: memos/{id} + description: "The name of the memo.\r\nFormat: memos/{id}" in: path required: true type: string @@ -1242,9 +1191,7 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name - description: |- - The name of the memo. - Format: memos/{id} + description: "The name of the memo.\r\nFormat: memos/{id}" in: path required: true type: string @@ -1271,9 +1218,7 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name - description: |- - The name of the memo. - Format: memos/{id}. Use "memos/-" to list all properties. + description: "The name of the memo.\r\nFormat: memos/{id}. Use \"memos/-\" to list all properties." in: path required: true type: string @@ -1296,9 +1241,7 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name - description: |- - The name of the memo. - Format: memos/{id}. Use "memos/-" to rebuild all memos. + description: "The name of the memo.\r\nFormat: memos/{id}. Use \"memos/-\" to rebuild all memos." in: path required: true type: string @@ -1325,9 +1268,7 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name - description: |- - The name of the memo. - Format: memos/{id} + description: "The name of the memo.\r\nFormat: memos/{id}" in: path required: true type: string @@ -1348,9 +1289,7 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name - description: |- - The name of the memo. - Format: memos/{id} + description: "The name of the memo.\r\nFormat: memos/{id}" in: path required: true type: string @@ -1377,9 +1316,7 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name - description: |- - The name of the memo. - Format: memos/{id} + description: "The name of the memo.\r\nFormat: memos/{id}" in: path required: true type: string @@ -1401,9 +1338,7 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name - description: |- - The name of the memo. - Format: memos/{id} + description: "The name of the memo.\r\nFormat: memos/{id}" in: path required: true type: string @@ -1430,9 +1365,7 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name - description: |- - The name of the memo. - Format: memos/{id} + description: "The name of the memo.\r\nFormat: memos/{id}" in: path required: true type: string @@ -1454,9 +1387,7 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name - description: |- - The name of the memo. - Format: memos/{id} + description: "The name of the memo.\r\nFormat: memos/{id}" in: path required: true type: string @@ -1483,9 +1414,7 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name - description: |- - The name of the user. - Format: users/{id} + description: "The name of the user.\r\nFormat: users/{id}" in: path required: true type: string @@ -1507,17 +1436,13 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: parent - description: |- - The parent, who owns the tags. - Format: memos/{id}. Use "memos/-" to list all tags. + description: "The parent, who owns the tags.\r\nFormat: memos/{id}. Use \"memos/-\" to list all tags." in: path required: true type: string pattern: memos/[^/]+ - name: filter - description: |- - Filter is used to filter memos. - Format: "creator == 'users/{uid}' && visibilities == ['PUBLIC', 'PROTECTED']" + description: "Filter is used to filter memos.\r\nFormat: \"creator == 'users/{uid}' && visibilities == ['PUBLIC', 'PROTECTED']\"" in: query required: false type: string @@ -1539,9 +1464,7 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: parent - description: |- - The parent, who owns the tags. - Format: memos/{id}. Use "memos/-" to delete all tags. + description: "The parent, who owns the tags.\r\nFormat: memos/{id}. Use \"memos/-\" to delete all tags." in: path required: true type: string @@ -1572,9 +1495,7 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: parent - description: |- - The parent, who owns the tags. - Format: memos/{id}. Use "memos/-" to rename all tags. + description: "The parent, who owns the tags.\r\nFormat: memos/{id}. Use \"memos/-\" to rename all tags." in: path required: true type: string @@ -1601,10 +1522,7 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: resource.name - description: |- - The name of the resource. - Format: resources/{id} - id is the system generated unique identifier. + description: "The name of the resource.\r\nFormat: resources/{id}\r\nid is the system generated unique identifier." in: path required: true type: string @@ -1636,9 +1554,7 @@ paths: format: int64 memo: type: string - title: |- - The related memo. - Format: memos/{id} + title: "The related memo.\r\nFormat: memos/{id}" tags: - ResourceService /api/v1/{setting.name}: @@ -1656,9 +1572,7 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: setting.name - description: |- - The name of the user. - Format: users/{id} + description: "The name of the user.\r\nFormat: users/{id}" in: path required: true type: string @@ -1695,9 +1609,7 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: user.name - description: |- - The name of the user. - Format: users/{id} + description: "The name of the user.\r\nFormat: users/{id}" in: path required: true type: string @@ -1751,9 +1663,7 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name - description: |- - The name of the user. - Format: users/{id} + description: "The name of the user.\r\nFormat: users/{id}" in: path required: true type: string @@ -1786,10 +1696,7 @@ paths: $ref: '#/definitions/googlerpcStatus' parameters: - name: name - description: |- - The name of the resource. - Format: resources/{id} - id is the system generated unique identifier. + description: "The name of the resource.\r\nFormat: resources/{id}\r\nid is the system generated unique identifier." in: path required: true type: string @@ -1976,9 +1883,7 @@ definitions: properties: name: type: string - title: |- - The name of the identityProvider. - Format: identityProviders/{id} + title: "The name of the identityProvider.\r\nFormat: identityProviders/{id}" type: $ref: '#/definitions/apiv1IdentityProviderType' title: @@ -2022,9 +1927,7 @@ definitions: properties: name: type: string - title: |- - The name of the user. - Format: users/{id} + title: "The name of the user.\r\nFormat: users/{id}" locale: type: string description: The preferred locale of the user. @@ -2068,10 +1971,7 @@ definitions: weekStartDayOffset: type: integer format: int32 - description: |- - week_start_day_offset is the week start day offset from Sunday. - 0: Sunday, 1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday - Default is Sunday. + description: "week_start_day_offset is the week start day offset from Sunday.\r\n0: Sunday, 1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday\r\nDefault is Sunday." apiv1WorkspaceMemoRelatedSetting: type: object properties: @@ -2102,9 +2002,7 @@ definitions: properties: name: type: string - title: |- - name is the name of the setting. - Format: settings/{setting} + title: "name is the name of the setting.\r\nFormat: settings/{setting}" generalSetting: $ref: '#/definitions/apiv1WorkspaceGeneralSetting' storageSetting: @@ -2119,9 +2017,7 @@ definitions: description: storage_type is the storage type. filepathTemplate: type: string - title: |- - The template of file path. - e.g. assets/{timestamp}_{filename} + title: "The template of file path.\r\ne.g. assets/{timestamp}_{filename}" uploadSizeLimitMb: type: string format: int64 @@ -2280,9 +2176,7 @@ definitions: properties: name: type: string - title: |- - The name of the activity. - Format: activities/{id} + title: "The name of the activity.\r\nFormat: activities/{id}" creatorId: type: integer format: int32 @@ -2413,9 +2307,7 @@ definitions: properties: name: type: string - title: |- - The name of the inbox. - Format: inboxes/{id} + title: "The name of the inbox.\r\nFormat: inboxes/{id}" sender: type: string title: 'Format: users/{id}' @@ -2535,10 +2427,7 @@ definitions: additionalProperties: type: integer format: int32 - description: |- - tag_amounts is the amount of tags. - key is the tag name. e.g. "tag1". - value is the amount of the tag. + description: "tag_amounts is the amount of tags.\r\nkey is the tag name. e.g. \"tag1\".\r\nvalue is the amount of the tag." v1ListMemosResponse: type: object properties: @@ -2549,9 +2438,7 @@ definitions: $ref: '#/definitions/v1Memo' nextPageToken: type: string - description: |- - A token, which can be sent as `page_token` to retrieve the next page. - If this field is omitted, there are no subsequent pages. + description: "A token, which can be sent as `page_token` to retrieve the next page.\r\nIf this field is omitted, there are no subsequent pages." v1ListResourcesResponse: type: object properties: @@ -2599,10 +2486,7 @@ definitions: properties: name: type: string - description: |- - The name of the memo. - Format: memos/{id} - id is the system generated id. + description: "The name of the memo.\r\nFormat: memos/{id}\r\nid is the system generated id." uid: type: string description: The user defined id of the memo. @@ -2610,9 +2494,7 @@ definitions: $ref: '#/definitions/v1RowStatus' creator: type: string - title: |- - The name of the creator. - Format: users/{id} + title: "The name of the creator.\r\nFormat: users/{id}" createTime: type: string format: date-time @@ -2665,9 +2547,7 @@ definitions: readOnly: true parent: type: string - title: |- - The name of the parent memo. - Format: memos/{id} + title: "The name of the parent memo.\r\nFormat: memos/{id}" readOnly: true snippet: type: string @@ -2692,9 +2572,7 @@ definitions: properties: name: type: string - title: |- - The name of the memo property. - Format: memos/{id}/properties/{property_id} + title: "The name of the memo property.\r\nFormat: memos/{id}/properties/{property_id}" property: $ref: '#/definitions/v1MemoProperty' readOnly: true @@ -2707,14 +2585,10 @@ definitions: properties: memo: type: string - title: |- - The name of memo. - Format: "memos/{uid}" + title: "The name of memo.\r\nFormat: \"memos/{uid}\"" relatedMemo: type: string - title: |- - The name of related memo. - Format: "memos/{uid}" + title: "The name of related memo.\r\nFormat: \"memos/{uid}\"" type: $ref: '#/definitions/v1MemoRelationType' v1MemoRelationType: @@ -2866,9 +2740,7 @@ definitions: format: int32 creator: type: string - title: |- - The name of the creator. - Format: users/{id} + title: "The name of the creator.\r\nFormat: users/{id}" contentId: type: string reactionType: @@ -2902,10 +2774,7 @@ definitions: properties: name: type: string - description: |- - The name of the resource. - Format: resources/{id} - id is the system generated unique identifier. + description: "The name of the resource.\r\nFormat: resources/{id}\r\nid is the system generated unique identifier." uid: type: string description: The user defined id of the resource. @@ -2927,9 +2796,7 @@ definitions: format: int64 memo: type: string - title: |- - The related memo. - Format: memos/{id} + title: "The related memo.\r\nFormat: memos/{id}" v1RestoreMarkdownNodesRequest: type: object properties: @@ -3051,9 +2918,7 @@ definitions: properties: name: type: string - title: |- - The name of the user. - Format: users/{id} + title: "The name of the user.\r\nFormat: users/{id}" id: type: integer format: int32 @@ -3127,9 +2992,7 @@ definitions: properties: owner: type: string - title: |- - The name of instance owner. - Format: "users/{id}" + title: "The name of instance owner.\r\nFormat: \"users/{id}\"" version: type: string title: version is the current version of instance diff --git a/web/src/components/MemoContent/MermaidBlock.tsx b/web/src/components/MemoContent/MermaidBlock.tsx index 7c11eb14..b2e294af 100644 --- a/web/src/components/MemoContent/MermaidBlock.tsx +++ b/web/src/components/MemoContent/MermaidBlock.tsx @@ -1,4 +1,3 @@ -import { useColorScheme } from "@mui/joy"; import mermaid from "mermaid"; import { useEffect, useRef } from "react"; @@ -7,9 +6,8 @@ interface Props { } const MermaidBlock: React.FC = ({ content }: Props) => { - const { mode } = useColorScheme(); const mermaidDockBlock = useRef(null); - mermaid.initialize({ startOnLoad: false, theme: mode }); + mermaid.initialize({ startOnLoad: false, theme: "default" }); useEffect(() => { if (!mermaidDockBlock.current) {