-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi-schema.yaml
More file actions
1546 lines (1505 loc) · 48.8 KB
/
api-schema.yaml
File metadata and controls
1546 lines (1505 loc) · 48.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.3
info:
title: PullLog API
description: |
ガチャ履歴管理アプリ「PullLog」バックエンドAPI仕様
version: 1.0.0
servers:
- url: https://api.pulllog.net/api/{basePath}
description: Production v1
variables:
basePath:
default: v1
description: APIバージョン
- url: http://localhost:3030/{basePath}
description: Local development as mockup
variables:
basePath:
default: beta
description: Beta版
- url: http://localhost:3030/api/{basePath}
description: Local development for stable
variables:
basePath:
default: v1
description: APIバージョン
paths:
/auth/login:
post:
summary: ユーザーログイン
description: |
メールアドレス・パスワードによるユーザー認証を行い、成功時にユーザー情報およびCSRFトークン等を返します。
Rememberオプションが有効な場合はRememberトークンも返却。
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/LoginRequest'
responses:
'200':
description: ログイン成功
content:
application/json:
schema:
$ref: '#/components/schemas/LoginResponse'
'401':
description: 認証エラー(メールアドレスまたはパスワード不正等)
content:
application/json:
schema:
$ref: '#/components/schemas/LoginResponse'
'500':
description: サーバーエラー
/auth/logout:
post:
summary: ユーザーログアウト
description: |
サーバー側のセッションを消去し、ログアウト状態にします。
クライアント側ではユーザー・CSRFトークン・アプリ等のキャッシュも削除推奨。
responses:
'200':
description: ログアウト成功
content:
application/json:
schema:
$ref: '#/components/schemas/VerifyResponse'
examples:
success:
value:
success: true
message: 'Logged out successfully.'
'500':
description: サーバーエラー
content:
application/json:
schema:
$ref: '#/components/schemas/VerifyResponse'
examples:
error:
value:
success: false
message: 'Logout failed due to server error.'
/auth/register:
post:
summary: アカウント新規登録
description: |
ユーザー名・メールアドレス・パスワード・言語設定で新規ユーザーアカウントを登録します。
登録後、メール認証が完了するまでアカウントは無効状態となり、ログインは不可です。
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/RegisterRequest'
responses:
'201':
description: 登録成功(メール認証待ち)
content:
application/json:
schema:
$ref: '#/components/schemas/RegisterResponse'
examples:
success:
value:
state: success
message: 'Registration completed. Please verify your email.'
'400':
description: バリデーションエラー等
content:
application/json:
schema:
$ref: '#/components/schemas/RegisterResponse'
examples:
error:
value:
state: error
message: 'Email already in use or invalid data.'
/auth/password:
post:
summary: パスワード再設定リクエスト
description: |
指定したメールアドレスにパスワード再設定用URL(認証コード付き)を送信します。
実際のパスワード再設定はメール経由で認証後に行います。
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PasswordResetRequest'
responses:
'200':
description: パスワード再設定メール送信成功
content:
application/json:
schema:
$ref: '#/components/schemas/PasswordResetResponse'
examples:
success:
value:
success: true
message: 'A password reset link has been sent to your email address.'
'404':
description: メールアドレスが登録されていない場合等
content:
application/json:
schema:
$ref: '#/components/schemas/PasswordResetResponse'
examples:
notfound:
value:
success: false
message: 'No account found for this email address.'
'400':
description: バリデーションエラー等
content:
application/json:
schema:
$ref: '#/components/schemas/PasswordResetResponse'
examples:
invalid:
value:
success: false
message: 'Invalid email address.'
put:
summary: パスワード再設定・確定
description: |
メールで送付された認証トークン・認証コード・新しいパスワードを受け取り、パスワードを更新します。
typeは "reset"(パスワードリセット時)のみ受け付けます。
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PasswordUpdateRequest'
responses:
'200':
description: パスワード更新成功
content:
application/json:
schema:
$ref: '#/components/schemas/VerifyResponse'
examples:
success:
value:
success: true
message: 'Password updated successfully.'
'400':
description: トークン・認証コード・バリデーションエラー
content:
application/json:
schema:
$ref: '#/components/schemas/VerifyResponse'
examples:
invalid:
value:
success: false
message: 'Invalid or expired token/code.'
'404':
description: ユーザー・トークンが存在しない場合等
content:
application/json:
schema:
$ref: '#/components/schemas/VerifyResponse'
examples:
notfound:
value:
success: false
message: 'User not found.'
/auth/verify:
post:
summary: メール認証トークン受付
description: |
メール本文記載のトークンおよび認証種別(type: signup or reset)を受け取り、認証処理を行います。
認証に成功するとアカウントが有効化、またはパスワードリセット処理が進行します。
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/VerifyTokenRequest'
responses:
'200':
description: 認証成功
content:
application/json:
schema:
$ref: '#/components/schemas/VerifyResponse'
examples:
success:
value:
success: true
message: 'Verification succeeded.'
'400':
description: 無効または期限切れトークン等
content:
application/json:
schema:
$ref: '#/components/schemas/VerifyResponse'
examples:
invalid:
value:
success: false
message: 'Invalid or expired token.'
'404':
description: トークン対象のユーザーが存在しない場合等
content:
application/json:
schema:
$ref: '#/components/schemas/VerifyResponse'
examples:
notfound:
value:
success: false
message: 'User not found.'
/auth/autologin:
post:
summary: 自動ログイン
description: |
クライアントのCookieに保存されたRememberトークンを使用して自動ログイン処理を行います。
成功時は通常のログインと同様にユーザー情報やCSRFトークン等を返します。
※リクエストボディは不要で、認証トークンはCookieで自動送信されます。
responses:
'200':
description: 自動ログイン成功
content:
application/json:
schema:
$ref: '#/components/schemas/LoginResponse'
examples:
success:
value:
state: success
user:
id: 1
name: "サンプルユーザー"
email: "user@example.com"
is_deleted: false
is_verified: true
created_at: "2024-01-01T00:00:00"
updated_at: "2024-01-01T00:00:00"
last_login: "2024-07-18T12:34:56"
language: ja
theme: light
csrfToken: "xxxxxx"
rememberToken: "xxxxxx"
'401':
description: トークン無効または認証エラー
content:
application/json:
schema:
$ref: '#/components/schemas/LoginResponse'
examples:
error:
value:
state: error
message: 'Invalid or expired token.'
user: null
csrfToken: null
rememberToken: null
'400':
description: リクエスト不正(Cookie未送信など)
content:
application/json:
schema:
$ref: '#/components/schemas/LoginResponse'
examples:
nocookie:
value:
state: error
message: 'No remember token found.'
user: null
csrfToken: null
rememberToken: null
/apps:
get:
summary: ユーザーの登録アプリ一覧取得
description: |
認証済みユーザーが自身の登録アプリ一覧を取得します。
リクエストヘッダ(x-csrf-token)に基づき、バックエンド側でユーザーを特定します。
security:
- CsrfAuth: []
responses:
'200':
description: アプリ一覧(空配列も許容)
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/AppData'
examples:
apps:
value:
- name: "サンプルアプリ1"
appId: "01HV54V9S30FJXDKM6QJY4KDKD"
url: "https://gacha.example.com"
description: "サンプルアプリの説明"
date_update_time: "04:00"
sync_update_time: true
currency_unit: "JPY"
pity_system: true
guarantee_count: 90
rarity_defs:
- label: "★5"
value: "01HV54V9S3Y9RK7Q2K2WRRYM1M"
marker_defs: []
task_defs: []
'401':
description: 認証・CSRFトークン不備等
post:
summary: アプリ新規登録
description: |
新しいガチャアプリ(タイトル・サービス)を登録します。
ユーザー情報はCSRFトークンヘッダで引き当てます。
security:
- CsrfAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AppData'
responses:
'201':
description: 登録成功
content:
application/json:
schema:
$ref: '#/components/schemas/AppData'
examples:
created:
value:
name: "新規アプリ"
appId: "01HV55X62BZ2WTK2V6E2WQ68CR"
url: "https://gacha.example.com"
description: "新規登録アプリの説明"
date_update_time: "05:00"
sync_update_time: false
currency_unit: "JPY"
'400':
description: バリデーションエラーなど
'401':
description: 認証・CSRF不備
/apps/{appId}:
get:
summary: 単一アプリデータ取得
description: |
指定したアプリID(appId)のアプリデータを取得します。
通常は /apps の一覧取得で全データを取得する運用が推奨されていますが、
将来的な拡張性・個別参照用としてAPI公開しています。
ユーザーの判別は x-csrf-token ヘッダによって行います。
security:
- CsrfAuth: []
parameters:
- in: path
name: appId
required: true
schema:
type: string
description: "アプリID(ULID形式)"
responses:
'200':
description: アプリデータ取得成功
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/AppData'
examples:
app:
value:
name: "サンプルアプリ"
appId: "01HV54V9S30FJXDKM6QJY4KDKD"
url: "https://gacha.example.com"
description: "サンプルアプリの説明"
date_update_time: "04:00"
sync_update_time: true
currency_unit: "JPY"
pity_system: true
guarantee_count: 90
rarity_defs:
- label: "★5"
value: "01HV54V9S3Y9RK7Q2K2WRRYM1M"
marker_defs: []
task_defs: []
'404':
description: 該当するアプリが存在しない場合(または権限がない場合)
content:
application/json:
schema:
type: object
properties:
app:
type: 'null'
example:
app: null
'401':
description: 認証・CSRFトークン不備等
put:
summary: アプリデータ更新
description: |
指定したアプリID(appId)のアプリ情報を更新します。
ユーザー判別はCSRFトークンで実施。対象が存在しない場合は404。
security:
- CsrfAuth: []
parameters:
- in: path
name: appId
required: true
schema:
type: string
description: "アプリID(ULID形式)"
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AppData'
responses:
'200':
description: 更新成功
content:
application/json:
schema:
$ref: '#/components/schemas/AppData'
'400':
description: バリデーションエラーなど
'404':
description: アプリIDが存在しない・権限なし
'401':
description: 認証・CSRF不備
delete:
summary: アプリの削除
description: |
指定したアプリID(appId)のアプリを削除します。
CSRFトークンヘッダで認証・ユーザー引き当てを行います。
security:
- CsrfAuth: []
parameters:
- in: path
name: appId
required: true
schema:
type: string
description: "削除するアプリID(ULID形式)"
responses:
'200':
description: 削除成功
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteResponse'
examples:
success:
value:
state: success
message: "アプリを削除しました。"
'400':
description: バリデーションエラー等
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteResponse'
examples:
error:
value:
state: error
message: "削除対象が存在しません。"
'404':
description: 対象アプリが存在しない・権限なし
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteResponse'
examples:
notfound:
value:
state: error
message: "指定されたアプリIDは存在しません。"
'401':
description: 認証・CSRFトークン不備等
/logs/{appId}:
get:
summary: アプリの日次ログ一覧取得
description: |
指定したアプリ(appId)の日次ログを取得します。
期間指定や件数制限、オフセットが可能です。
CSRFトークンヘッダでユーザーを判別します。
security:
- CsrfAuth: []
parameters:
- in: path
name: appId
required: true
schema:
type: string
description: "アプリID(ULID形式)"
- in: query
name: from
schema:
type: string
format: date
required: false
description: "取得範囲の開始日(YYYY-MM-DD)"
- in: query
name: to
schema:
type: string
format: date
required: false
description: "取得範囲の終了日(YYYY-MM-DD)"
- in: query
name: limit
schema:
type: integer
minimum: 1
required: false
description: "取得件数(省略時は無制限)"
- in: query
name: offset
schema:
type: integer
minimum: 0
required: false
description: "開始オフセット(ページネーション用途)"
responses:
'200':
description: 日次ログ配列(該当なし時は空配列)
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/DateLog'
examples:
logs:
value:
- appId: "01HV54V9S30FJXDKM6QJY4KDKD"
date: "2024-07-18"
total_pulls: 50
discharge_items: 2
drop_details:
- rarity: "★5"
name: "エクスカリバー"
marker: "限定"
- rarity: "★4"
name: "マナ"
marker: null
expense: 3000
tags: ["爆死", "ピックアップ"]
free_text: "天井手前で★5ゲット"
images: []
tasks: []
last_updated: "2024-07-18T12:34:56"
'400':
description: バリデーションエラー等
'401':
description: 認証・CSRF不備等
'404':
description: appIdが存在しない・権限なし
/logs/daily/{appId}/{date}:
get:
summary: 指定アプリ・日付の日次ログデータ取得
description: |
指定アプリID(appId)・日付(date)の日次ログデータを1件取得します。
ユーザー判別はリクエストヘッダの x-csrf-token で行います。
該当データがなければ null を返します。
security:
- CsrfAuth: []
parameters:
- in: path
name: appId
required: true
schema:
type: string
description: "アプリID(ULID形式)"
- in: path
name: date
required: true
schema:
type: string
format: date
description: "日付(YYYY-MM-DD)"
responses:
'200':
description: 日次ログデータ取得成功
content:
application/json:
schema:
$ref: '#/components/schemas/DateLog'
examples:
log:
value:
appId: "01HV54V9S30FJXDKM6QJY4KDKD"
date: "2024-07-19"
total_pulls: 30
discharge_items: 1
drop_details:
- rarity: "★5"
name: "ラストワン賞"
marker: null
expense: 2000
tags: ["イベント"]
free_text: "神引き!"
images: []
tasks: []
last_updated: "2024-07-19T10:15:00"
'404':
description: ログが存在しない場合
content:
application/json:
schema:
type: object
properties:
log:
type: 'null'
example:
log: null
'401':
description: 認証・CSRF不備等
post:
summary: 日次ログの新規登録
description: |
指定したアプリID・日付に対する日次ログを新規作成します。
ユーザー認証はCSRFトークンヘッダにより実施します。
security:
- CsrfAuth: []
parameters:
- in: path
name: appId
required: true
schema:
type: string
description: "アプリID(ULID形式)"
- in: path
name: date
required: true
schema:
type: string
format: date
description: "記録対象日(YYYY-MM-DD)"
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/DateLog'
responses:
'201':
description: 登録成功
content:
application/json:
schema:
$ref: '#/components/schemas/DateLog'
'400':
description: バリデーションエラー
'401':
description: 認証・CSRF不備等
'409':
description: 既にデータが存在する場合(ユニーク制約エラー)
put:
summary: 日次ログの更新
description: |
指定したアプリID・日付の既存の日次ログを更新します。
ユーザー認証はCSRFトークンヘッダにより実施します。
security:
- CsrfAuth: []
parameters:
- in: path
name: appId
required: true
schema:
type: string
description: "アプリID(ULID形式)"
- in: path
name: date
required: true
schema:
type: string
format: date
description: "記録対象日(YYYY-MM-DD)"
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/DateLog'
responses:
'200':
description: 更新成功
content:
application/json:
schema:
$ref: '#/components/schemas/DateLog'
'400':
description: バリデーションエラー
'401':
description: 認証・CSRF不備等
'404':
description: データが存在しない場合
delete:
summary: 日次ログデータの削除
description: |
指定したアプリID・日付の日次ログデータを削除します。
CSRFトークンヘッダでユーザー認証・権限確認を行います。
(現時点でフロントUI未実装ですが、将来のためAPIとしては公開)
security:
- CsrfAuth: []
parameters:
- in: path
name: appId
required: true
schema:
type: string
description: "アプリID(ULID形式)"
- in: path
name: date
required: true
schema:
type: string
format: date
description: "削除対象日付(YYYY-MM-DD)"
responses:
'200':
description: 削除成功
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteResponse'
examples:
success:
value:
state: success
message: "日次ログデータを削除しました。"
'404':
description: 対象ログが存在しない場合
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteResponse'
examples:
notfound:
value:
state: error
message: "指定された日次ログデータは存在しません。"
'401':
description: 認証・CSRFトークン不備等
'400':
description: バリデーションエラー等
/logs/import/{appId}:
post:
summary: ログデータのバルクインポート
description: |
指定アプリIDのログデータをJSONまたはCSVファイルで一括インポートします。
モードにより「全上書き」または「マージ」が選択可能です。
ユーザー認証はCSRFトークンヘッダにより行います。
security:
- CsrfAuth: []
parameters:
- in: path
name: appId
required: true
schema:
type: string
description: "アプリID(ULID形式)"
- in: query
name: mode
required: true
schema:
type: string
enum: [overwrite, merge]
description: "インポートモード: overwrite=全上書き、merge=既存とマージ"
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
file:
type: string
format: binary
description: "アップロードする履歴ファイル(jsonまたはcsv)"
required:
- file
responses:
'200':
description: インポート結果(成功または失敗)
content:
application/json:
schema:
$ref: '#/components/schemas/ImportLogsResponse'
examples:
success:
value:
state: success
message: "履歴のインポートが完了しました。"
error:
value:
state: error
message: "ファイル形式が不正です。"
'400':
description: バリデーションエラー・ファイル不備等
'401':
description: 認証・CSRF不備等
/stats/{appId}:
get:
summary: アプリ単位の統計データ取得
description: |
指定アプリIDの集計期間における統計データを取得します。
CSRFトークンヘッダでユーザー認証・引き当てを行います。
security:
- CsrfAuth: []
parameters:
- in: path
name: appId
required: true
schema:
type: string
description: "アプリID(ULID形式)"
- in: query
name: start
required: true
schema:
type: string
format: date
description: "集計開始日(YYYY-MM-DD)"
- in: query
name: end
required: true
schema:
type: string
format: date
description: "集計終了日(YYYY-MM-DD)"
responses:
'200':
description: 統計データ取得成功
content:
application/json:
schema:
$ref: '#/components/schemas/StatsData'
examples:
stats:
value:
appId: "01HV54V9S30FJXDKM6QJY4KDKD"
startDate: "2024-06-01"
endDate: "2024-06-30"
totalPulls: 500
rareDropCount: 7
rareDropRate: 0.014
totalExpense: 25000
averageExpense: 3571
averageRareDropRate: 71.4
totalLogs: 30
monthsInPeriod: 1
averageMonthlyExpense: 25000
'400':
description: バリデーションエラー
'401':
description: 認証・CSRF不備等
'404':
description: appIdが存在しない・権限なし
/user/update:
put:
summary: ユーザープロフィール更新
description: |
ログインユーザー自身のプロフィール情報(表示名、アバター画像、言語設定、テーマなど)を部分更新します。
テキストのみ、または画像ファイル等を含む場合は multipart/form-data で送信可能です。
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UserUpdateRequest'
multipart/form-data:
schema:
$ref: '#/components/schemas/UserUpdateRequestFormData'
responses:
'200':
description: 更新成功
content:
application/json:
schema:
$ref: '#/components/schemas/UserUpdateResponse'
examples:
success:
value:
state: success
user:
id: 1
name: "新しい表示名"
email: "user@example.com"
avatar_url: "https://cdn.example.com/avatars/1.jpg"
language: ja
theme: dark
updated_at: "2024-07-18T23:45:01"
is_deleted: false
is_verified: true
created_at: "2024-01-01T00:00:00"
last_login: "2024-07-18T12:34:56"
message: "プロフィールを更新しました。"
'400':
description: バリデーションエラー等
content:
application/json:
schema:
$ref: '#/components/schemas/UserUpdateResponse'
examples:
error:
value:
state: error
user: null
message: "Invalid profile data."
'401':
description: 未認証・権限なし
components:
schemas:
# 認証・ユーザー関連
LoginRequest:
type: object
properties:
email:
type: string
format: email
example: user@example.com
description: ログイン用メールアドレス
password:
type: string
example: password123
description: パスワード(プレーンテキスト)
remember:
type: boolean
example: true
description: "Remember Me オプション。trueの場合、remember_tokenが返される"
required:
- email
- password
LoginResponse:
type: object