diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2019-04-25 13:25:10 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2019-04-25 13:25:10 +0900 |
| commit | 6721d27e3f085a2335485eed0eb90409240539c1 (patch) | |
| tree | 9cfebab85e7cd4651f2d2dac9929a21d7d21e6da /src/server/api/openapi | |
| parent | Improve API definition (diff) | |
| download | sharkey-6721d27e3f085a2335485eed0eb90409240539c1.tar.gz sharkey-6721d27e3f085a2335485eed0eb90409240539c1.tar.bz2 sharkey-6721d27e3f085a2335485eed0eb90409240539c1.zip | |
Improve hashtag API
Diffstat (limited to 'src/server/api/openapi')
| -rw-r--r-- | src/server/api/openapi/schemas.ts | 46 |
1 files changed, 2 insertions, 44 deletions
diff --git a/src/server/api/openapi/schemas.ts b/src/server/api/openapi/schemas.ts index e54f989e74..34e6f8947d 100644 --- a/src/server/api/openapi/schemas.ts +++ b/src/server/api/openapi/schemas.ts @@ -11,6 +11,7 @@ import { packedFollowingSchema } from '../../../models/repositories/following'; import { packedMutingSchema } from '../../../models/repositories/muting'; import { packedBlockingSchema } from '../../../models/repositories/blocking'; import { packedNoteReactionSchema } from '../../../models/repositories/note-reaction'; +import { packedHashtagSchema } from '../../../models/repositories/hashtag'; export function convertSchemaToOpenApiSchema(schema: Schema) { const res: any = schema; @@ -74,48 +75,5 @@ export const schemas = { Muting: convertSchemaToOpenApiSchema(packedMutingSchema), Blocking: convertSchemaToOpenApiSchema(packedBlockingSchema), NoteReaction: convertSchemaToOpenApiSchema(packedNoteReactionSchema), - - Hashtag: { - type: 'object', - properties: { - tag: { - type: 'string', - description: 'The hashtag name. No # prefixed.', - example: 'misskey', - }, - mentionedUsersCount: { - type: 'number', - description: 'Number of all users using this hashtag.' - }, - mentionedLocalUsersCount: { - type: 'number', - description: 'Number of local users using this hashtag.' - }, - mentionedRemoteUsersCount: { - type: 'number', - description: 'Number of remote users using this hashtag.' - }, - attachedUsersCount: { - type: 'number', - description: 'Number of all users who attached this hashtag to profile.' - }, - attachedLocalUsersCount: { - type: 'number', - description: 'Number of local users who attached this hashtag to profile.' - }, - attachedRemoteUsersCount: { - type: 'number', - description: 'Number of remote users who attached this hashtag to profile.' - }, - }, - required: [ - 'tag', - 'mentionedUsersCount', - 'mentionedLocalUsersCount', - 'mentionedRemoteUsersCount', - 'attachedUsersCount', - 'attachedLocalUsersCount', - 'attachedRemoteUsersCount', - ] - }, + Hashtag: convertSchemaToOpenApiSchema(packedHashtagSchema), }; |