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,35 +1,35 @@
export const packedUserGroupSchema = {
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',
},
name: {
type: 'string' as const,
optional: false as const, nullable: false as const,
type: 'string',
optional: false, nullable: false,
},
ownerId: {
type: 'string' as const,
nullable: false as const, optional: false as const,
type: 'string',
nullable: false, optional: false,
format: 'id',
},
userIds: {
type: 'array' as const,
nullable: false as const, optional: true as const,
type: 'array',
nullable: false, optional: true,
items: {
type: 'string' as const,
nullable: false as const, optional: false as const,
type: 'string',
nullable: false, optional: false,
format: 'id',
},
},
},
};
} as const;