mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-27 16:13:09 +02:00
parent
e6cdf1b995
commit
1903aaf351
3 changed files with 51 additions and 1 deletions
|
@ -84,5 +84,51 @@ export const packedPageSchema = {
|
|||
type: types.object,
|
||||
optional: bool.false, nullable: bool.false,
|
||||
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',
|
||||
'read: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 { packedNoteReactionSchema } from '../../../models/repositories/note-reaction';
|
||||
import { packedHashtagSchema } from '../../../models/repositories/hashtag';
|
||||
import { packedPageSchema } from '../../../models/repositories/page';
|
||||
|
||||
export function convertSchemaToOpenApiSchema(schema: Schema) {
|
||||
const res: any = schema;
|
||||
|
@ -76,4 +77,5 @@ export const schemas = {
|
|||
Blocking: convertSchemaToOpenApiSchema(packedBlockingSchema),
|
||||
NoteReaction: convertSchemaToOpenApiSchema(packedNoteReactionSchema),
|
||||
Hashtag: convertSchemaToOpenApiSchema(packedHashtagSchema),
|
||||
Page: convertSchemaToOpenApiSchema(packedPageSchema),
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue