-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.v1.yaml
More file actions
1685 lines (1685 loc) · 49.1 KB
/
openapi.v1.yaml
File metadata and controls
1685 lines (1685 loc) · 49.1 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.1.0
info:
title: O(NlogN) API v1
version: 1.0.0-draft
description: |
O(NlogN) API 계약 스켈레톤.
이 기준선은 루트 메타데이터, 공통 보안, 재사용 가능한 컴포넌트를 정의한다.
contact:
name: O(NlogN) API Team
url: https://api.onlogn.com
servers:
- url: https://api.onlogn.com
description: 운영 환경
- url: http://localhost:3000
description: 로컬 개발
security:
- BearerAuth: []
tags:
- name: auth
description: 인증 및 세션 작업.
- name: users
description: 인증 사용자 프로필 작업.
- name: profiles
description: 공개 프로필 및 프로필 범위 조회 작업.
- name: groups
description: 소유자 범위 group 관리 작업.
- name: tasks
description: Task CRUD 및 조회 작업.
- name: calendar
description: 캘린더 집계 작업.
- name: reactions
description: 공개 task reaction 작업.
paths:
/api/v1/auth/oauth/github/exchange:
post:
tags:
- auth
summary: GitHub OAuth code 교환
operationId: exchangeGithubOAuthCode
description: |
GitHub OAuth authorization code를 새 access/refresh token으로 교환한다.
토큰은 JSON 응답 body 필드로만 반환되며 cookies에 중복되지 않는다.
security: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AuthGithubExchangeRequestEnvelope'
responses:
'200':
description: Access 및 refresh token 발급 성공.
content:
application/json:
schema:
$ref: '#/components/schemas/AuthTokenSuccessEnvelope'
'400':
$ref: '#/components/responses/BadRequestProblemResponse'
'401':
$ref: '#/components/responses/AuthenticationProblemResponse'
'429':
$ref: '#/components/responses/RateLimitProblemResponse'
/api/v1/auth/refresh:
post:
tags:
- auth
summary: Refresh token 회전
operationId: rotateRefreshToken
description: |
성공 호출마다 refresh token을 회전하고, 이전에 제시된 token을 즉시 무효화한다.
이미 무효화된 refresh token을 재사용하면 401 RFC9457 problem details로 실패한다.
security: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AuthRefreshRequestEnvelope'
responses:
'200':
description: 회전 후 새 access 및 refresh token 발급.
content:
application/json:
schema:
$ref: '#/components/schemas/AuthTokenSuccessEnvelope'
'400':
$ref: '#/components/responses/BadRequestProblemResponse'
'401':
$ref: '#/components/responses/AuthenticationProblemResponse'
'429':
$ref: '#/components/responses/RateLimitProblemResponse'
/api/v1/auth/logout:
post:
tags:
- auth
summary: 현재 디바이스 로그아웃
operationId: logoutCurrentDevice
description: |
제공된 refresh token이 나타내는 현재 디바이스 세션만 폐기한다.
v1 엔드포인트는 전체 디바이스 또는 계정 단위 로그아웃을 수행하지 않는다.
security: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AuthLogoutRequestEnvelope'
responses:
'204':
description: 현재 디바이스 세션이 폐기되었거나 이미 없음.
headers:
X-Request-Id:
description: 이 성공 로그아웃 요청의 추적 id.
schema:
type: string
example: req_01JZ4T8V6W5X4Y3Z2A1
'400':
$ref: '#/components/responses/BadRequestProblemResponse'
'401':
$ref: '#/components/responses/AuthenticationProblemResponse'
'429':
$ref: '#/components/responses/RateLimitProblemResponse'
/api/v1/users/me:
get:
tags:
- users
summary: 현재 인증 사용자 조회
operationId: getCurrentUser
description: |
private 컨텍스트에서 인증 사용자의 전체 프로필 payload를 반환한다.
responses:
'200':
description: 현재 사용자 레코드.
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/DataMetaEnvelope'
- type: object
properties:
data:
$ref: '#/components/schemas/UserMeProfile'
example:
data:
id: 123e4567-e89b-12d3-a456-426614174000
profile_slug: johndoe
email: user@example.com
display_name: John Doe
avatar_url: https://cdn.onlogn.com/avatars/user.png
timezone: UTC
created_at: 2025-01-01T00:00:00Z
updated_at: 2025-01-01T01:00:00Z
'401':
$ref: '#/components/responses/ProblemResponse'
'500':
$ref: '#/components/responses/ProblemResponse'
/api/v1/profiles/{slug}:
get:
tags:
- profiles
summary: slug로 공개 프로필 조회
operationId: getProfileBySlug
description: |
지정된 slug에 대해 공개 allowlist 프로필 객체를 반환한다.
security: []
parameters:
- name: slug
in: path
required: true
schema:
type: string
description: 공개 프로필 slug.
responses:
'200':
description: 공개 프로필 payload.
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/DataMetaEnvelope'
- type: object
properties:
data:
$ref: '#/components/schemas/ProfilePublic'
example:
data:
profile_slug: johndoe
display_name: John Doe
avatar_url: https://cdn.onlogn.com/avatars/user.png
bio: Product designer focused on clear systems.
timezone: UTC
created_at: 2025-01-01T00:00:00Z
stats_summary:
total_tasks: 12
done_tasks: 8
in_progress_tasks: 3
todo_tasks: 1
'404':
$ref: '#/components/responses/ProblemResponse'
'500':
$ref: '#/components/responses/ProblemResponse'
/api/v1/groups:
get:
tags:
- groups
summary: group 목록 조회
operationId: listGroups
description: |
인증 사용자를 위한 owner 범위 group 목록.
parameters:
- $ref: '#/components/parameters/OffsetParam'
- $ref: '#/components/parameters/LimitParam'
responses:
'200':
description: Group 목록.
content:
application/json:
schema:
$ref: '#/components/schemas/GroupListResponse'
'400':
$ref: '#/components/responses/ProblemResponse'
'401':
$ref: '#/components/responses/ProblemResponse'
'403':
$ref: '#/components/responses/ProblemResponse'
'429':
$ref: '#/components/responses/ProblemResponse'
'500':
$ref: '#/components/responses/ProblemResponse'
post:
tags:
- groups
summary: group 생성
operationId: createGroup
description: |
새 owner 범위 group을 생성한다.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/GroupCreateRequest'
responses:
'201':
description: Group 생성 완료.
content:
application/json:
schema:
$ref: '#/components/schemas/GroupResponse'
'400':
$ref: '#/components/responses/ProblemResponse'
'401':
$ref: '#/components/responses/ProblemResponse'
'403':
$ref: '#/components/responses/ProblemResponse'
'422':
$ref: '#/components/responses/ValidationProblemResponse'
'429':
$ref: '#/components/responses/ProblemResponse'
'500':
$ref: '#/components/responses/ProblemResponse'
/api/v1/groups/{group_id}:
get:
tags:
- groups
summary: group 조회
operationId: getGroup
description: |
owner 범위에서 단일 group을 조회한다.
parameters:
- name: group_id
in: path
required: true
schema:
type: string
format: uuid
responses:
'200':
description: Group 상세.
content:
application/json:
schema:
$ref: '#/components/schemas/GroupResponse'
'401':
$ref: '#/components/responses/ProblemResponse'
'403':
$ref: '#/components/responses/ProblemResponse'
'404':
$ref: '#/components/responses/ProblemResponse'
'429':
$ref: '#/components/responses/ProblemResponse'
'500':
$ref: '#/components/responses/ProblemResponse'
patch:
tags:
- groups
summary: group 수정
operationId: updateGroup
description: |
owner 범위 group 메타데이터(visibility, description, color, icon)를 수정한다.
parameters:
- name: group_id
in: path
required: true
schema:
type: string
format: uuid
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/GroupUpdateRequest'
responses:
'200':
description: Group 수정 완료.
content:
application/json:
schema:
$ref: '#/components/schemas/GroupResponse'
'401':
$ref: '#/components/responses/ProblemResponse'
'403':
$ref: '#/components/responses/ProblemResponse'
'404':
$ref: '#/components/responses/ProblemResponse'
'422':
$ref: '#/components/responses/ValidationProblemResponse'
'429':
$ref: '#/components/responses/ProblemResponse'
'500':
$ref: '#/components/responses/ProblemResponse'
delete:
tags:
- groups
summary: group 삭제
operationId: deleteGroup
description: |
소유한 group을 삭제한다. 연결된 task는 `group_id = null`로 재할당된다.
parameters:
- name: group_id
in: path
required: true
schema:
type: string
format: uuid
responses:
'204':
description: |
Group 삭제 완료, 연결된 task를 `group_id = null`로 재할당.
headers:
X-Request-Id:
description: 이 성공 삭제 요청의 추적 id.
schema:
type: string
example: req_01JZ4T8V6W5X4Y3Z2A1
'401':
$ref: '#/components/responses/ProblemResponse'
'403':
$ref: '#/components/responses/ProblemResponse'
'404':
$ref: '#/components/responses/ProblemResponse'
'409':
$ref: '#/components/responses/ProblemResponse'
'429':
$ref: '#/components/responses/ProblemResponse'
'500':
$ref: '#/components/responses/ProblemResponse'
/api/v1/tasks:
get:
tags:
- tasks
summary: owner task 목록 조회
operationId: listTasks
description: |
인증 사용자를 위한 owner 범위 task 목록.
기준 정렬은 `created_at desc`, 타이브레이커는 `id desc`다.
parameters:
- $ref: '#/components/parameters/OffsetParam'
- $ref: '#/components/parameters/LimitParam'
- $ref: '#/components/parameters/TaskStatusParam'
- $ref: '#/components/parameters/TaskVisibilityParam'
- $ref: '#/components/parameters/TaskGroupIdParam'
- $ref: '#/components/parameters/TaskDueDateFromParam'
- $ref: '#/components/parameters/TaskDueDateToParam'
- $ref: '#/components/parameters/TaskSortParam'
responses:
'200':
description: Task 목록.
content:
application/json:
schema:
$ref: '#/components/schemas/TaskListResponse'
'400':
$ref: '#/components/responses/ProblemResponse'
'401':
$ref: '#/components/responses/ProblemResponse'
'403':
$ref: '#/components/responses/ProblemResponse'
'500':
$ref: '#/components/responses/ProblemResponse'
post:
tags:
- tasks
summary: owner task 생성
operationId: createTask
description: 인증 owner 범위에서 task를 생성한다.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/TaskCreateRequest'
responses:
'201':
description: Task 생성 완료.
content:
application/json:
schema:
$ref: '#/components/schemas/TaskResponse'
'401':
$ref: '#/components/responses/ProblemResponse'
'403':
$ref: '#/components/responses/ProblemResponse'
'422':
$ref: '#/components/responses/ValidationProblemResponse'
'500':
$ref: '#/components/responses/ProblemResponse'
/api/v1/tasks/{task_id}:
get:
tags:
- tasks
summary: owner task 조회
operationId: getTask
description: owner 범위 단일 task를 조회한다.
parameters:
- $ref: '#/components/parameters/TaskIdParam'
responses:
'200':
description: Task 상세.
content:
application/json:
schema:
$ref: '#/components/schemas/TaskResponse'
'401':
$ref: '#/components/responses/ProblemResponse'
'403':
$ref: '#/components/responses/ProblemResponse'
'404':
$ref: '#/components/responses/ProblemResponse'
'500':
$ref: '#/components/responses/ProblemResponse'
patch:
tags:
- tasks
summary: owner task 수정
operationId: updateTask
description: owner 범위 task의 변경 가능한 필드를 수정한다.
parameters:
- $ref: '#/components/parameters/TaskIdParam'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/TaskUpdateRequest'
responses:
'200':
description: Task 수정 완료.
content:
application/json:
schema:
$ref: '#/components/schemas/TaskResponse'
'401':
$ref: '#/components/responses/ProblemResponse'
'403':
$ref: '#/components/responses/ProblemResponse'
'404':
$ref: '#/components/responses/ProblemResponse'
'422':
$ref: '#/components/responses/ValidationProblemResponse'
'500':
$ref: '#/components/responses/ProblemResponse'
delete:
tags:
- tasks
summary: owner task 삭제
operationId: deleteTask
description: owner 범위 task를 삭제한다.
parameters:
- $ref: '#/components/parameters/TaskIdParam'
responses:
'204':
description: Task 삭제 완료.
headers:
X-Request-Id:
description: 이 성공 삭제 요청의 추적 id.
schema:
type: string
example: req_01JZ4T8V6W5X4Y3Z2A1
'401':
$ref: '#/components/responses/ProblemResponse'
'403':
$ref: '#/components/responses/ProblemResponse'
'404':
$ref: '#/components/responses/ProblemResponse'
'500':
$ref: '#/components/responses/ProblemResponse'
/api/v1/profiles/{slug}/tasks:
get:
tags:
- profiles
- tasks
summary: profile slug 기준 공개 task 목록 조회
operationId: listProfileTasks
description: |
지정된 profile slug의 공개 task만 반환한다.
서버가 public visibility 경계를 강제한다.
security: []
parameters:
- $ref: '#/components/parameters/ProfileSlugParam'
- $ref: '#/components/parameters/OffsetParam'
- $ref: '#/components/parameters/LimitParam'
- $ref: '#/components/parameters/TaskStatusParam'
- $ref: '#/components/parameters/TaskGroupIdParam'
- $ref: '#/components/parameters/TaskDueDateFromParam'
- $ref: '#/components/parameters/TaskDueDateToParam'
- $ref: '#/components/parameters/TaskSortParam'
responses:
'200':
description: profile의 공개 task 목록.
content:
application/json:
schema:
$ref: '#/components/schemas/TaskListResponse'
'400':
$ref: '#/components/responses/ProblemResponse'
'404':
$ref: '#/components/responses/ProblemResponse'
'500':
$ref: '#/components/responses/ProblemResponse'
/api/v1/tasks/calendar/monthly:
get:
tags:
- tasks
- calendar
summary: 월간 task 캘린더 조회
operationId: getMonthlyTaskCalendar
description: |
요청한 `(year, month)`에 대해 0 값으로 채운 날짜를 포함해 완전한 일자 버킷을 반환한다.
parameters:
- $ref: '#/components/parameters/CalendarYearParam'
- $ref: '#/components/parameters/CalendarMonthParam'
responses:
'200':
description: 월간 캘린더 집계.
content:
application/json:
schema:
$ref: '#/components/schemas/TaskMonthlyCalendarResponse'
'400':
$ref: '#/components/responses/ProblemResponse'
'401':
$ref: '#/components/responses/ProblemResponse'
'500':
$ref: '#/components/responses/ProblemResponse'
/api/v1/tasks/{task_id}/reactions:
get:
tags:
- tasks
- reactions
summary: 공개 task reaction 목록 조회
operationId: listTaskReactions
description: 공개 task의 reaction 집계를 반환한다.
security: []
parameters:
- $ref: '#/components/parameters/TaskIdParam'
responses:
'200':
description: Reaction 목록.
content:
application/json:
schema:
$ref: '#/components/schemas/TaskReactionListResponse'
'404':
$ref: '#/components/responses/ProblemResponse'
'500':
$ref: '#/components/responses/ProblemResponse'
post:
tags:
- tasks
- reactions
summary: 공개 task reaction 토글
operationId: toggleTaskReaction
description: |
공개 task에서 사용자별, 이모지별 reaction을 토글한다.
`(user_id, task_id, emoji)` 조합마다 논리적 reaction 행은 하나다.
parameters:
- $ref: '#/components/parameters/TaskIdParam'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/TaskReactionToggleRequest'
responses:
'200':
description: Reaction 상태 토글 완료.
content:
application/json:
schema:
$ref: '#/components/schemas/TaskReactionMutationResponse'
'401':
$ref: '#/components/responses/ProblemResponse'
'404':
$ref: '#/components/responses/ProblemResponse'
'422':
$ref: '#/components/responses/ValidationProblemResponse'
'500':
$ref: '#/components/responses/ProblemResponse'
delete:
tags:
- tasks
- reactions
summary: 공개 task reaction 제거
operationId: removeTaskReaction
description: 공개 task에서 현재 사용자의 특정 emoji reaction을 제거한다.
parameters:
- $ref: '#/components/parameters/TaskIdParam'
- $ref: '#/components/parameters/ReactionEmojiParam'
responses:
'200':
description: Reaction 제거 완료.
content:
application/json:
schema:
$ref: '#/components/schemas/TaskReactionMutationResponse'
'401':
$ref: '#/components/responses/ProblemResponse'
'404':
$ref: '#/components/responses/ProblemResponse'
'422':
$ref: '#/components/responses/ValidationProblemResponse'
'500':
$ref: '#/components/responses/ProblemResponse'
components:
securitySchemes:
BearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: |
보호 엔드포인트를 위한 access token 전달 방식.
auth 엔드포인트에서는 토큰을 JSON 응답 body로 전달한다.
parameters:
OffsetParam:
name: offset
in: query
description: 목록 페이지네이션용 0 기반 offset.
required: false
schema:
type: integer
minimum: 0
default: 0
LimitParam:
name: limit
in: query
description: 목록 페이지네이션용 페이지 크기.
required: false
schema:
type: integer
minimum: 1
maximum: 100
default: 20
ProfileSlugParam:
name: slug
in: path
description: 공개 프로필 slug.
required: true
schema:
type: string
minLength: 1
TaskIdParam:
name: task_id
in: path
description: Task 식별자.
required: true
schema:
type: string
format: uuid
TaskStatusParam:
name: status
in: query
required: false
schema:
$ref: '#/components/schemas/TaskStatus'
TaskVisibilityParam:
name: visibility
in: query
required: false
schema:
$ref: '#/components/schemas/TaskVisibility'
TaskGroupIdParam:
name: group_id
in: query
required: false
description: 그룹 미지정 task를 위한 UUID group id 또는 리터럴 `null`.
schema:
oneOf:
- type: string
format: uuid
- type: string
const: 'null'
TaskDueDateFromParam:
name: due_date_from
in: query
required: false
schema:
type: string
format: date
TaskDueDateToParam:
name: due_date_to
in: query
required: false
schema:
type: string
format: date
TaskSortParam:
name: sort
in: query
description: v1에서는 `created_at desc`만 허용한다.
required: false
schema:
type: string
enum:
- created_at desc
default: created_at desc
CalendarYearParam:
name: year
in: query
required: true
schema:
type: integer
minimum: 1970
maximum: 2100
CalendarMonthParam:
name: month
in: query
required: true
schema:
type: integer
minimum: 1
maximum: 12
ReactionEmojiParam:
name: emoji
in: query
required: true
schema:
type: string
minLength: 1
schemas:
TaskStatus:
type: string
enum:
- todo
- in_progress
- done
TaskVisibility:
type: string
enum:
- private
- public
AuthGithubExchangeRequestData:
type: object
required:
- code
properties:
code:
type: string
description: GitHub OAuth가 발급한 authorization code.
minLength: 1
example: gh_oauth_code_123
AuthGithubExchangeRequestEnvelope:
type: object
required:
- data
properties:
data:
$ref: '#/components/schemas/AuthGithubExchangeRequestData'
AuthRefreshRequestData:
type: object
required:
- refresh_token
properties:
refresh_token:
type: string
description: 현재 클라이언트가 보유한 refresh token.
minLength: 1
example: rf_01JZ4T3Q8R9A2F4M7N6
AuthRefreshRequestEnvelope:
type: object
required:
- data
properties:
data:
$ref: '#/components/schemas/AuthRefreshRequestData'
AuthLogoutRequestData:
type: object
required:
- refresh_token
properties:
refresh_token:
type: string
description: 현재 디바이스 세션 폐기를 위한 refresh token.
minLength: 1
example: rf_01JZ4T3Q8R9A2F4M7N6
AuthLogoutRequestEnvelope:
type: object
required:
- data
properties:
data:
$ref: '#/components/schemas/AuthLogoutRequestData'
AuthTokenPayload:
type: object
required:
- access_token
- refresh_token
- token_type
- expires_in
- refresh_expires_in
properties:
access_token:
type: string
minLength: 1
description: 보호된 API 작업용 access token.
example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
refresh_token:
type: string
minLength: 1
description: 회전용 1회 사용 refresh token.
example: rf_01JZ4T3Q8R9A2F4M7N6
token_type:
type: string
enum:
- Bearer
description: Authorization token 유형.
example: Bearer
expires_in:
type: integer
minimum: 1
description: access token TTL(초).
example: 900
refresh_expires_in:
type: integer
minimum: 1
description: refresh token TTL(초).
example: 1209600
AuthTokenSuccessEnvelope:
type: object
required:
- data
properties:
data:
$ref: '#/components/schemas/AuthTokenPayload'
example:
data:
access_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.example
refresh_token: rf_01JZ4T3Q8R9A2F4M7N6
token_type: Bearer
expires_in: 900
refresh_expires_in: 1209600
Problem:
type: object
description: RFC9457 problem details 객체.
required:
- type
- title
- status
- detail
- instance
properties:
type:
type: string
format: uri
description: 안정적인 problem type URI.
example: https://api.onlogn.com/problems/resource-not-found
title:
type: string
description: problem type의 짧고 사람이 읽을 수 있는 요약.
example: Resource Not Found
status:
type: integer
description: HTTP 상태 코드.
minimum: 100
maximum: 599
example: 404
detail:
type: string
description: 이 발생 건에 대한 사람이 읽을 수 있는 설명.
example: Requested resource does not exist.
instance:
type: string
description: 해당 problem 발생 건을 가리키는 URI 참조.
example: /api/v1/tasks/req_01JZ4T3Q8R9A2F4M7N6
request_id:
type: string
description: 지원 및 관측을 위한 추적 식별자.
ValidationErrorItem:
type: object
required:
- field
- reason
properties:
field:
type: string
description: 유효하지 않은 요청 필드 이름.
example: status
reason:
type: string
description: 검증 실패 사유.
example: "must be one of: todo, in_progress, done"
ValidationProblem:
allOf:
- $ref: '#/components/schemas/Problem'
- type: object
properties:
errors:
type: array
items:
$ref: '#/components/schemas/ValidationErrorItem'
PaginationMeta:
type: object
description: 목록 응답용 공통 페이지네이션 메타데이터.
required:
- offset
- limit
- total
- sort
properties:
offset:
type: integer
minimum: 0
example: 0
limit:
type: integer
minimum: 1
maximum: 100
example: 20
total:
type: integer
minimum: 0
example: 125
sort:
type: string
description: 결정적인 정렬 표현식.
example: created_at desc, id desc
ListMeta:
type: object
description: 목록 응답을 위한 공통 `meta` 객체 기준선.
required:
- pagination
properties:
pagination:
$ref: '#/components/schemas/PaginationMeta'
DataMetaEnvelope:
type: object
description: 공통 성공 envelope 기준선(`data` + optional `meta`).
required:
- data
properties:
data:
description: 작업 payload, 구체 스키마는 엔드포인트별로 정의된다.
meta:
description: 목록/집계 응답용 선택 메타데이터.
$ref: '#/components/schemas/ListMeta'
UserMeProfile:
type: object
description: "`/api/v1/users/me`용 인증 사용자 payload."
required:
- id
- profile_slug
- email
- display_name
- avatar_url
- timezone
- created_at
- updated_at
properties:
id:
type: string
format: uuid
example: 123e4567-e89b-12d3-a456-426614174000
profile_slug:
type: string
example: johndoe
email:
type: string
format: email
nullable: true