mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-26 22:43:03 +00:00
parent
e6cdf1b995
commit
1903aaf351
3 changed files with 51 additions and 1 deletions
|
@ -84,5 +84,51 @@ export const packedPageSchema = {
|
||||||
type: types.object,
|
type: types.object,
|
||||||
optional: bool.false, nullable: bool.false,
|
optional: bool.false, nullable: bool.false,
|
||||||
properties: {
|
properties: {
|
||||||
|
id: {
|
||||||
|
type: types.string,
|
||||||
|
optional: bool.false, nullable: bool.false,
|
||||||
|
format: 'id',
|
||||||
|
example: 'xxxxxxxxxx',
|
||||||
|
},
|
||||||
|
createdAt: {
|
||||||
|
type: types.string,
|
||||||
|
optional: bool.false, nullable: bool.false,
|
||||||
|
format: 'date-time',
|
||||||
|
},
|
||||||
|
updatedAt: {
|
||||||
|
type: types.string,
|
||||||
|
optional: bool.false, nullable: bool.false,
|
||||||
|
format: 'date-time',
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
type: types.string,
|
||||||
|
optional: bool.false, nullable: bool.false,
|
||||||
|
},
|
||||||
|
name: {
|
||||||
|
type: types.string,
|
||||||
|
optional: bool.false, nullable: bool.false,
|
||||||
|
},
|
||||||
|
summary: {
|
||||||
|
type: types.string,
|
||||||
|
optional: bool.false, nullable: bool.true,
|
||||||
|
},
|
||||||
|
content: {
|
||||||
|
type: types.array,
|
||||||
|
optional: bool.false, nullable: bool.false,
|
||||||
|
},
|
||||||
|
variables: {
|
||||||
|
type: types.array,
|
||||||
|
optional: bool.false, nullable: bool.false,
|
||||||
|
},
|
||||||
|
userId: {
|
||||||
|
type: types.string,
|
||||||
|
optional: bool.false, nullable: bool.false,
|
||||||
|
format: 'id',
|
||||||
|
},
|
||||||
|
user: {
|
||||||
|
type: types.object,
|
||||||
|
ref: 'User',
|
||||||
|
optional: bool.false, nullable: bool.false,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -18,5 +18,7 @@ export const kinds = [
|
||||||
'write:notifications',
|
'write:notifications',
|
||||||
'read:reactions',
|
'read:reactions',
|
||||||
'write:reactions',
|
'write:reactions',
|
||||||
'write:votes'
|
'write:votes',
|
||||||
|
'read:pages',
|
||||||
|
'write:pages',
|
||||||
];
|
];
|
||||||
|
|
|
@ -12,6 +12,7 @@ import { packedMutingSchema } from '../../../models/repositories/muting';
|
||||||
import { packedBlockingSchema } from '../../../models/repositories/blocking';
|
import { packedBlockingSchema } from '../../../models/repositories/blocking';
|
||||||
import { packedNoteReactionSchema } from '../../../models/repositories/note-reaction';
|
import { packedNoteReactionSchema } from '../../../models/repositories/note-reaction';
|
||||||
import { packedHashtagSchema } from '../../../models/repositories/hashtag';
|
import { packedHashtagSchema } from '../../../models/repositories/hashtag';
|
||||||
|
import { packedPageSchema } from '../../../models/repositories/page';
|
||||||
|
|
||||||
export function convertSchemaToOpenApiSchema(schema: Schema) {
|
export function convertSchemaToOpenApiSchema(schema: Schema) {
|
||||||
const res: any = schema;
|
const res: any = schema;
|
||||||
|
@ -76,4 +77,5 @@ export const schemas = {
|
||||||
Blocking: convertSchemaToOpenApiSchema(packedBlockingSchema),
|
Blocking: convertSchemaToOpenApiSchema(packedBlockingSchema),
|
||||||
NoteReaction: convertSchemaToOpenApiSchema(packedNoteReactionSchema),
|
NoteReaction: convertSchemaToOpenApiSchema(packedNoteReactionSchema),
|
||||||
Hashtag: convertSchemaToOpenApiSchema(packedHashtagSchema),
|
Hashtag: convertSchemaToOpenApiSchema(packedHashtagSchema),
|
||||||
|
Page: convertSchemaToOpenApiSchema(packedPageSchema),
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue