Ensure enum schema and Make "as const" put once

This commit is contained in:
tamaina
2022-01-14 19:55:09 +09:00
parent 59a5d00d6b
commit 37bae7b929
25 changed files with 716 additions and 713 deletions

View File

@@ -1,27 +1,27 @@
export const packedMutingSchema = {
type: 'object' as const,
optional: false as const, nullable: false as const,
type: 'object',
optional: false, nullable: false,
properties: {
id: {
type: 'string' as const,
optional: false as const, nullable: false as const,
type: 'string',
optional: false, nullable: false,
format: 'id',
example: 'xxxxxxxxxx',
},
createdAt: {
type: 'string' as const,
optional: false as const, nullable: false as const,
type: 'string',
optional: false, nullable: false,
format: 'date-time',
},
muteeId: {
type: 'string' as const,
optional: false as const, nullable: false as const,
type: 'string',
optional: false, nullable: false,
format: 'id',
},
mutee: {
type: 'object' as const,
optional: false as const, nullable: false as const,
ref: 'User' as const,
type: 'object',
optional: false, nullable: false,
ref: 'User',
},
},
};
} as const;