Merged PR 283: API IF修正

## 概要
[Task2306: API IF修正](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/2306)

- ユーザー一覧取得のAPI IFで抜けていた修正を入れました。
  - TypistGroupNameを配列で持つよう修正
  - nullableをrequiredに変更

## レビューポイント
- 共有

## UIの変更
- なし

## 動作確認状況
- ローカルで確認
This commit is contained in:
makabe.t 2023-07-27 10:23:09 +00:00
parent d080bb74b3
commit 386cee3bca
4 changed files with 12 additions and 15 deletions

View File

@ -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"
]
},

View File

@ -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({

View File

@ -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,

View File

@ -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;