diff --git a/dictation_server/src/api/odms/openapi.json b/dictation_server/src/api/odms/openapi.json index 0dd1122..81aebc6 100644 --- a/dictation_server/src/api/odms/openapi.json +++ b/dictation_server/src/api/odms/openapi.json @@ -1984,8 +1984,8 @@ "properties": { "name": { "type": "string" }, "role": { "type": "string", "description": "none/author/typist" }, - "authorId": { "type": "string", "nullable": true }, - "typistGroupName": { "type": "string", "nullable": true }, + "authorId": { "type": "string" }, + "typistGroupName": { "type": "array", "items": { "type": "string" } }, "email": { "type": "string" }, "emailVerified": { "type": "boolean" }, "autoRenew": { "type": "boolean" }, @@ -1993,8 +1993,8 @@ "notification": { "type": "boolean" }, "encryption": { "type": "boolean" }, "prompt": { "type": "boolean" }, - "expiration": { "type": "string", "nullable": true }, - "remaining": { "type": "number", "nullable": true }, + "expiration": { "type": "string" }, + "remaining": { "type": "number" }, "licenseStatus": { "type": "string", "description": "Normal/NoLicense/Alert/Renew" @@ -2003,7 +2003,6 @@ "required": [ "name", "role", - "authorId", "typistGroupName", "email", "emailVerified", @@ -2012,8 +2011,6 @@ "notification", "encryption", "prompt", - "expiration", - "remaining", "licenseStatus" ] }, diff --git a/dictation_server/src/features/users/types/types.ts b/dictation_server/src/features/users/types/types.ts index 515336d..c789013 100644 --- a/dictation_server/src/features/users/types/types.ts +++ b/dictation_server/src/features/users/types/types.ts @@ -20,11 +20,11 @@ export class User { @ApiProperty({ description: 'none/author/typist' }) role: string; - @ApiProperty({ nullable: true }) + @ApiProperty({ required: false }) authorId?: string | undefined; - @ApiProperty({ nullable: true }) - typistGroupName?: string | undefined; + @ApiProperty() + typistGroupName: string[]; @ApiProperty() email: string; @@ -47,10 +47,10 @@ export class User { @ApiProperty() prompt: boolean; - @ApiProperty({ nullable: true }) + @ApiProperty({ required: false }) expiration?: string | undefined; - @ApiProperty({ nullable: true }) + @ApiProperty({ required: false }) remaining?: number | undefined; @ApiProperty({ diff --git a/dictation_server/src/features/users/users.service.spec.ts b/dictation_server/src/features/users/users.service.spec.ts index 9781663..252effc 100644 --- a/dictation_server/src/features/users/users.service.spec.ts +++ b/dictation_server/src/features/users/users.service.spec.ts @@ -580,7 +580,7 @@ const expectedUsers = [ name: 'Hanako Sato', role: 'none', authorId: '6cce347f-0cf1-a15e-19ab-d00988b643f9', - typistGroupName: '', + typistGroupName: [''], email: 'hanako@sample.com', emailVerified: true, autoRenew: false, @@ -594,7 +594,7 @@ const expectedUsers = [ name: 'Hanako Sato', role: 'none', authorId: '551c4077-5b55-a38c-2c55-cd1edd537aa8', - typistGroupName: '', + typistGroupName: [''], email: 'hanako@sample.com', emailVerified: true, autoRenew: false, diff --git a/dictation_server/src/features/users/users.service.ts b/dictation_server/src/features/users/users.service.ts index 767bb65..9a157b2 100644 --- a/dictation_server/src/features/users/users.service.ts +++ b/dictation_server/src/features/users/users.service.ts @@ -316,7 +316,7 @@ export class UsersService { user.role = dbUsers[i].role; user.authorId = dbUsers[i].author_id; // TODO [Task2247] 将来的にはDBから取得できるようになる想定のため暫定的にtypistGroupNameに仮の値を設定 - user.typistGroupName = ''; + user.typistGroupName = ['']; user.email = aadb2cUser.mail; user.emailVerified = dbUsers[i].email_verified; user.autoRenew = dbUsers[i].auto_renew;