chore: tweak gen apidocs

This commit is contained in:
Steven 2024-09-23 08:43:16 +08:00
parent 6cbe957db2
commit 171a89564e
2 changed files with 204 additions and 66 deletions

View File

@ -19,8 +19,9 @@ plugins:
opt:
- paths=source_relative
- plugin: buf.build/grpc-ecosystem/openapiv2
out: ../docs
opt: output_format=yaml,allow_merge=true
out: gen
opt:
- output_format=yaml,allow_merge=true
# Build the TypeScript definitions for the web.
- plugin: buf.build/community/stephenh-ts-proto
out: ../web/src/types/proto

View File

@ -300,12 +300,16 @@ paths:
type: integer
format: int32
- name: pageToken
description: "A page token, received from a previous `ListMemos` call.\r\nProvide this to retrieve the subsequent page."
description: |-
A page token, received from a previous `ListMemos` call.
Provide 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.\r\nFormat: \"creator == 'users/{uid}' && visibilities == ['PUBLIC', 'PROTECTED']\""
description: |-
Filter is used to filter memos returned in the list.
Format: "creator == 'users/{uid}' && visibilities == ['PUBLIC', 'PROTECTED']"
in: query
required: false
type: string
@ -480,7 +484,9 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: filter
description: "Filter is used to filter users returned in the list.\r\nFormat: \"username == 'frank'\""
description: |-
Filter is used to filter users returned in the list.
Format: "username == 'frank'"
in: query
required: false
type: string
@ -641,7 +647,9 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
description: "The resource name of the workspace setting.\r\nFormat: settings/{setting}"
description: |-
The resource name of the workspace setting.
Format: settings/{setting}
in: path
required: true
type: string
@ -663,7 +671,9 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: setting.name
description: "name is the name of the setting.\r\nFormat: settings/{setting}"
description: |-
name is the name of the setting.
Format: settings/{setting}
in: path
required: true
type: string
@ -699,7 +709,9 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: identityProvider.name
description: "The name of the identityProvider.\r\nFormat: identityProviders/{id}"
description: |-
The name of the identityProvider.
Format: identityProviders/{id}
in: path
required: true
type: string
@ -737,7 +749,9 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: inbox.name
description: "The name of the inbox.\r\nFormat: inboxes/{id}"
description: |-
The name of the inbox.
Format: inboxes/{id}
in: path
required: true
type: string
@ -781,7 +795,10 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: memo.name
description: "The name of the memo.\r\nFormat: memos/{id}\r\nid is the system generated id."
description: |-
The name of the memo.
Format: memos/{id}
id is the system generated id.
in: path
required: true
type: string
@ -799,7 +816,9 @@ paths:
$ref: '#/definitions/v1RowStatus'
creator:
type: string
title: "The name of the creator.\r\nFormat: users/{id}"
title: |-
The name of the creator.
Format: users/{id}
createTime:
type: string
format: date-time
@ -846,7 +865,9 @@ paths:
readOnly: true
parent:
type: string
title: "The name of the parent memo.\r\nFormat: memos/{id}"
title: |-
The name of the parent memo.
Format: memos/{id}
readOnly: true
snippet:
type: string
@ -868,7 +889,9 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name_1
description: "The name of the user.\r\nFormat: users/{id}"
description: |-
The name of the user.
Format: users/{id}
in: path
required: true
type: string
@ -890,7 +913,9 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name_1
description: "The name of the identityProvider to delete.\r\nFormat: identityProviders/{id}"
description: |-
The name of the identityProvider to delete.
Format: identityProviders/{id}
in: path
required: true
type: string
@ -912,7 +937,9 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name_2
description: "The name of the identityProvider to get.\r\nFormat: identityProviders/{id}"
description: |-
The name of the identityProvider to get.
Format: identityProviders/{id}
in: path
required: true
type: string
@ -934,7 +961,9 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name_2
description: "The name of the inbox to delete.\r\nFormat: inboxes/{id}"
description: |-
The name of the inbox to delete.
Format: inboxes/{id}
in: path
required: true
type: string
@ -956,7 +985,10 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name_3
description: "The name of the resource.\r\nFormat: resources/{id}\r\nid is the system generated unique identifier."
description: |-
The name of the resource.
Format: resources/{id}
id is the system generated unique identifier.
in: path
required: true
type: string
@ -978,7 +1010,10 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name_3
description: "The name of the resource.\r\nFormat: resources/{id}\r\nid is the system generated unique identifier."
description: |-
The name of the resource.
Format: resources/{id}
id is the system generated unique identifier.
in: path
required: true
type: string
@ -1000,7 +1035,9 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name_4
description: "The name of the memo.\r\nFormat: memos/{id}"
description: |-
The name of the memo.
Format: memos/{id}
in: path
required: true
type: string
@ -1022,7 +1059,9 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name_4
description: "The name of the memo.\r\nFormat: memos/{id}"
description: |-
The name of the memo.
Format: memos/{id}
in: path
required: true
type: string
@ -1044,7 +1083,9 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
description: "The name of the activity.\r\nFormat: activities/{id}"
description: |-
The name of the activity.
Format: activities/{id}
in: path
required: true
type: string
@ -1066,7 +1107,9 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
description: "The name of the user.\r\nFormat: users/{id}"
description: |-
The name of the user.
Format: users/{id}
in: path
required: true
type: string
@ -1088,7 +1131,9 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
description: "The name of the user.\r\nFormat: users/{id}"
description: |-
The name of the user.
Format: users/{id}
in: path
required: true
type: string
@ -1109,7 +1154,9 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
description: "The name of the user.\r\nFormat: users/{id}"
description: |-
The name of the user.
Format: users/{id}
in: path
required: true
type: string
@ -1137,7 +1184,9 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
description: "The name of the user.\r\nFormat: users/{id}"
description: |-
The name of the user.
Format: users/{id}
in: path
required: true
type: string
@ -1164,7 +1213,9 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
description: "The name of the memo.\r\nFormat: memos/{id}"
description: |-
The name of the memo.
Format: memos/{id}
in: path
required: true
type: string
@ -1185,7 +1236,9 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
description: "The name of the memo.\r\nFormat: memos/{id}"
description: |-
The name of the memo.
Format: memos/{id}
in: path
required: true
type: string
@ -1212,7 +1265,9 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
description: "The name of the memo.\r\nFormat: memos/{id}. Use \"memos/-\" to list all properties."
description: |-
The name of the memo.
Format: memos/{id}. Use "memos/-" to list all properties.
in: path
required: true
type: string
@ -1235,7 +1290,9 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
description: "The name of the memo.\r\nFormat: memos/{id}. Use \"memos/-\" to rebuild all memos."
description: |-
The name of the memo.
Format: memos/{id}. Use "memos/-" to rebuild all memos.
in: path
required: true
type: string
@ -1262,7 +1319,9 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
description: "The name of the memo.\r\nFormat: memos/{id}"
description: |-
The name of the memo.
Format: memos/{id}
in: path
required: true
type: string
@ -1283,7 +1342,9 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
description: "The name of the memo.\r\nFormat: memos/{id}"
description: |-
The name of the memo.
Format: memos/{id}
in: path
required: true
type: string
@ -1310,7 +1371,9 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
description: "The name of the memo.\r\nFormat: memos/{id}"
description: |-
The name of the memo.
Format: memos/{id}
in: path
required: true
type: string
@ -1332,7 +1395,9 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
description: "The name of the memo.\r\nFormat: memos/{id}"
description: |-
The name of the memo.
Format: memos/{id}
in: path
required: true
type: string
@ -1359,7 +1424,9 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
description: "The name of the memo.\r\nFormat: memos/{id}"
description: |-
The name of the memo.
Format: memos/{id}
in: path
required: true
type: string
@ -1381,7 +1448,9 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
description: "The name of the memo.\r\nFormat: memos/{id}"
description: |-
The name of the memo.
Format: memos/{id}
in: path
required: true
type: string
@ -1408,7 +1477,9 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
description: "The name of the user.\r\nFormat: users/{id}"
description: |-
The name of the user.
Format: users/{id}
in: path
required: true
type: string
@ -1430,13 +1501,17 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: parent
description: "The parent, who owns the tags.\r\nFormat: memos/{id}. Use \"memos/-\" to list all tags."
description: |-
The parent, who owns the tags.
Format: 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.\r\nFormat: \"creator == 'users/{uid}' && visibilities == ['PUBLIC', 'PROTECTED']\""
description: |-
Filter is used to filter memos.
Format: "creator == 'users/{uid}' && visibilities == ['PUBLIC', 'PROTECTED']"
in: query
required: false
type: string
@ -1458,7 +1533,9 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: parent
description: "The parent, who owns the tags.\r\nFormat: memos/{id}. Use \"memos/-\" to delete all tags."
description: |-
The parent, who owns the tags.
Format: memos/{id}. Use "memos/-" to delete all tags.
in: path
required: true
type: string
@ -1489,7 +1566,9 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: parent
description: "The parent, who owns the tags.\r\nFormat: memos/{id}. Use \"memos/-\" to rename all tags."
description: |-
The parent, who owns the tags.
Format: memos/{id}. Use "memos/-" to rename all tags.
in: path
required: true
type: string
@ -1516,7 +1595,10 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: resource.name
description: "The name of the resource.\r\nFormat: resources/{id}\r\nid is the system generated unique identifier."
description: |-
The name of the resource.
Format: resources/{id}
id is the system generated unique identifier.
in: path
required: true
type: string
@ -1548,7 +1630,9 @@ paths:
format: int64
memo:
type: string
title: "The related memo.\r\nFormat: memos/{id}"
title: |-
The related memo.
Format: memos/{id}
tags:
- ResourceService
/api/v1/{setting.name}:
@ -1566,7 +1650,9 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: setting.name
description: "The name of the user.\r\nFormat: users/{id}"
description: |-
The name of the user.
Format: users/{id}
in: path
required: true
type: string
@ -1603,7 +1689,9 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: user.name
description: "The name of the user.\r\nFormat: users/{id}"
description: |-
The name of the user.
Format: users/{id}
in: path
required: true
type: string
@ -1657,7 +1745,9 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
description: "The name of the user.\r\nFormat: users/{id}"
description: |-
The name of the user.
Format: users/{id}
in: path
required: true
type: string
@ -1690,7 +1780,10 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
description: "The name of the resource.\r\nFormat: resources/{id}\r\nid is the system generated unique identifier."
description: |-
The name of the resource.
Format: resources/{id}
id is the system generated unique identifier.
in: path
required: true
type: string
@ -1885,7 +1978,9 @@ definitions:
properties:
name:
type: string
title: "The name of the identityProvider.\r\nFormat: identityProviders/{id}"
title: |-
The name of the identityProvider.
Format: identityProviders/{id}
type:
$ref: '#/definitions/apiv1IdentityProviderType'
title:
@ -1929,7 +2024,9 @@ definitions:
properties:
name:
type: string
title: "The name of the user.\r\nFormat: users/{id}"
title: |-
The name of the user.
Format: users/{id}
locale:
type: string
description: The preferred locale of the user.
@ -1973,7 +2070,10 @@ definitions:
weekStartDayOffset:
type: integer
format: int32
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."
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.
disallowChangeUsername:
type: boolean
description: disallow_change_username disallows changing username.
@ -2010,7 +2110,9 @@ definitions:
properties:
name:
type: string
title: "name is the name of the setting.\r\nFormat: settings/{setting}"
title: |-
name is the name of the setting.
Format: settings/{setting}
generalSetting:
$ref: '#/definitions/apiv1WorkspaceGeneralSetting'
storageSetting:
@ -2025,7 +2127,9 @@ definitions:
description: storage_type is the storage type.
filepathTemplate:
type: string
title: "The template of file path.\r\ne.g. assets/{timestamp}_{filename}"
title: |-
The template of file path.
e.g. assets/{timestamp}_{filename}
uploadSizeLimitMb:
type: string
format: int64
@ -2184,7 +2288,9 @@ definitions:
properties:
name:
type: string
title: "The name of the activity.\r\nFormat: activities/{id}"
title: |-
The name of the activity.
Format: activities/{id}
creatorId:
type: integer
format: int32
@ -2325,7 +2431,9 @@ definitions:
properties:
name:
type: string
title: "The name of the inbox.\r\nFormat: inboxes/{id}"
title: |-
The name of the inbox.
Format: inboxes/{id}
sender:
type: string
title: 'Format: users/{id}'
@ -2445,7 +2553,10 @@ definitions:
additionalProperties:
type: integer
format: int32
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."
description: |-
tag_amounts is the amount of tags.
key is the tag name. e.g. "tag1".
value is the amount of the tag.
v1ListMemosResponse:
type: object
properties:
@ -2456,7 +2567,9 @@ definitions:
$ref: '#/definitions/v1Memo'
nextPageToken:
type: string
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."
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.
v1ListNode:
type: object
properties:
@ -2517,7 +2630,10 @@ definitions:
properties:
name:
type: string
description: "The name of the memo.\r\nFormat: memos/{id}\r\nid is the system generated id."
description: |-
The name of the memo.
Format: memos/{id}
id is the system generated id.
uid:
type: string
description: The user defined id of the memo.
@ -2525,7 +2641,9 @@ definitions:
$ref: '#/definitions/v1RowStatus'
creator:
type: string
title: "The name of the creator.\r\nFormat: users/{id}"
title: |-
The name of the creator.
Format: users/{id}
createTime:
type: string
format: date-time
@ -2572,7 +2690,9 @@ definitions:
readOnly: true
parent:
type: string
title: "The name of the parent memo.\r\nFormat: memos/{id}"
title: |-
The name of the parent memo.
Format: memos/{id}
readOnly: true
snippet:
type: string
@ -2597,7 +2717,9 @@ definitions:
properties:
name:
type: string
title: "The name of the memo property.\r\nFormat: memos/{id}/properties/{property_id}"
title: |-
The name of the memo property.
Format: memos/{id}/properties/{property_id}
property:
$ref: '#/definitions/v1MemoProperty'
readOnly: true
@ -2610,10 +2732,14 @@ definitions:
properties:
memo:
type: string
title: "The name of memo.\r\nFormat: \"memos/{uid}\""
title: |-
The name of memo.
Format: "memos/{uid}"
relatedMemo:
type: string
title: "The name of related memo.\r\nFormat: \"memos/{uid}\""
title: |-
The name of related memo.
Format: "memos/{uid}"
type:
$ref: '#/definitions/v1MemoRelationType'
v1MemoRelationType:
@ -2773,7 +2899,9 @@ definitions:
format: int32
creator:
type: string
title: "The name of the creator.\r\nFormat: users/{id}"
title: |-
The name of the creator.
Format: users/{id}
contentId:
type: string
reactionType:
@ -2807,7 +2935,10 @@ definitions:
properties:
name:
type: string
description: "The name of the resource.\r\nFormat: resources/{id}\r\nid is the system generated unique identifier."
description: |-
The name of the resource.
Format: resources/{id}
id is the system generated unique identifier.
uid:
type: string
description: The user defined id of the resource.
@ -2829,7 +2960,9 @@ definitions:
format: int64
memo:
type: string
title: "The related memo.\r\nFormat: memos/{id}"
title: |-
The related memo.
Format: memos/{id}
v1RestoreMarkdownNodesRequest:
type: object
properties:
@ -2951,7 +3084,9 @@ definitions:
properties:
name:
type: string
title: "The name of the user.\r\nFormat: users/{id}"
title: |-
The name of the user.
Format: users/{id}
id:
type: integer
format: int32
@ -3025,7 +3160,9 @@ definitions:
properties:
owner:
type: string
title: "The name of instance owner.\r\nFormat: \"users/{id}\""
title: |-
The name of instance owner.
Format: "users/{id}"
version:
type: string
title: version is the current version of instance