Skip to content

Commit 90e3d5f

Browse files
committed
Added individual complex put and delete api definition
1 parent 1841ffd commit 90e3d5f

1 file changed

Lines changed: 117 additions & 37 deletions

File tree

openapi.yaml

Lines changed: 117 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,8 @@ tags:
254254
description: Operations related to user actions
255255
- name: Badges
256256
description: Operations related to badges
257+
- name: Health
258+
description: API health check
257259

258260
paths:
259261
/ping:
@@ -340,24 +342,86 @@ paths:
340342
required: true
341343
description: 操作対象のコンプレックスID
342344
schema:
343-
type: string
344-
format: uuid
345-
example: "f47ac10b-58cc-4372-a567-0e02b2c3d479"
345+
type: integer
346+
format: int64
347+
example: 1
346348
get:
347349
summary: 指定されたIDのコンプレックス情報を取得します。
348350
tags:
349351
- Complexes
352+
security:
353+
- BearerAuth: []
350354
responses:
351355
"200":
352356
description: コンプレックス情報が正常に取得されました。
353357
content:
354358
application/json:
355359
schema:
356360
$ref: "#/components/schemas/Complex"
361+
"401":
362+
description: 認証エラー
363+
content:
364+
application/json:
365+
schema:
366+
$ref: "#/components/schemas/Error"
357367
"404":
358368
description: 指定されたコンプレックスが見つかりません。
359369
"500":
360-
description: サーバー内部エラー。
370+
description: サーバー内部エラー
371+
put:
372+
summary: 既存のコンプレックス情報を更新します。
373+
tags:
374+
- Complexes
375+
security:
376+
- BearerAuth: []
377+
requestBody:
378+
required: true
379+
content:
380+
application/json:
381+
schema:
382+
$ref: "#/components/schemas/ComplexInput"
383+
responses:
384+
"200":
385+
description: コンプレックスが正常に更新されました。
386+
content:
387+
application/json:
388+
schema:
389+
$ref: "#/components/schemas/Complex"
390+
"400":
391+
description: リクエストが不正です。
392+
content:
393+
application/json:
394+
schema:
395+
$ref: "#/components/schemas/Error"
396+
"401":
397+
description: 認証エラー
398+
content:
399+
application/json:
400+
schema:
401+
$ref: "#/components/schemas/Error"
402+
"404":
403+
description: 指定されたコンプレックスが見つかりません。
404+
"500":
405+
description: サーバー内部エラー
406+
delete:
407+
summary: 既存のコンプレックスを削除します。
408+
tags:
409+
- Complexes
410+
security:
411+
- BearerAuth: []
412+
responses:
413+
"204":
414+
description: コンプレックスが正常に削除されました。
415+
"401":
416+
description: 認証エラー
417+
content:
418+
application/json:
419+
schema:
420+
$ref: "#/components/schemas/Error"
421+
"404":
422+
description: 指定されたコンプレックスが見つかりません。
423+
"500":
424+
description: サーバー内部エラー
361425

362426
/goals:
363427
get:
@@ -448,8 +512,18 @@ paths:
448512
application/json:
449513
schema:
450514
$ref: "#/components/schemas/Goal"
515+
"400":
516+
description: リクエスト不正 (バリデーションエラーなど)
517+
content:
518+
application/json:
519+
schema:
520+
$ref: "#/components/schemas/Error"
451521
"401":
452522
description: 認証エラー
523+
content:
524+
application/json:
525+
schema:
526+
$ref: "#/components/schemas/Error"
453527
"404":
454528
description: 指定された目標が見つかりません
455529
"500":
@@ -475,8 +549,16 @@ paths:
475549
$ref: "#/components/schemas/Goal"
476550
"400":
477551
description: リクエスト不正
552+
content:
553+
application/json:
554+
schema:
555+
$ref: "#/components/schemas/Error"
478556
"401":
479557
description: 認証エラー
558+
content:
559+
application/json:
560+
schema:
561+
$ref: "#/components/schemas/Error"
480562
"404":
481563
description: 指定された目標が見つかりません
482564
"500":
@@ -492,6 +574,10 @@ paths:
492574
description: 目標の削除成功
493575
"401":
494576
description: 認証エラー
577+
content:
578+
application/json:
579+
schema:
580+
$ref: "#/components/schemas/Error"
495581
"404":
496582
description: 指定された目標が見つかりません
497583
"500":
@@ -519,10 +605,22 @@ paths:
519605
$ref: "#/components/schemas/Action"
520606
"400":
521607
description: リクエスト不正
522-
"401":
523-
description: 認証エラー
524-
"500":
525-
description: サーバー内部エラー
608+
content:
609+
application/json:
610+
schema:
611+
$ref: "#/components/schemas/Error"
612+
"401":
613+
description: 認証エラー
614+
content:
615+
application/json:
616+
schema:
617+
$ref: "#/components/schemas/Error"
618+
"500":
619+
description: サーバー内部エラー
620+
content:
621+
application/json:
622+
schema:
623+
$ref: "#/components/schemas/Error"
526624
# GET /actions は要件に応じてフィルタリングパラメータ(例: goal_id, user_id, date_range)を追加検討
527625

528626
/badges:
@@ -543,6 +641,10 @@ paths:
543641
$ref: "#/components/schemas/Badge"
544642
"500":
545643
description: サーバー内部エラー
644+
content:
645+
application/json:
646+
schema:
647+
$ref: "#/components/schemas/Error"
546648

547649
/me/badges:
548650
get:
@@ -562,35 +664,13 @@ paths:
562664
$ref: "#/components/schemas/UserBadge"
563665
"401":
564666
description: 認証エラー
565-
"500":
566-
description: サーバー内部エラー
567-
put:
568-
summary: 既存のコンプレックス情報を更新します。
569-
requestBody:
570-
required: true
571667
content:
572668
application/json:
573669
schema:
574-
$ref: "#/components/schemas/ComplexInput"
575-
responses:
576-
"200":
577-
description: コンプレックスが正常に更新されました。
578-
content:
579-
application/json:
580-
schema:
581-
$ref: "#/components/schemas/Complex"
582-
"400":
583-
description: リクエストが不正です。
584-
"404":
585-
description: 指定されたコンプレックスが見つかりません。
586-
"500":
587-
description: サーバー内部エラー。
588-
delete:
589-
summary: 既存のコンプレックスを削除します。
590-
responses:
591-
"204":
592-
description: コンプレックスが正常に削除されました。
593-
"404":
594-
description: 指定されたコンプレックスが見つかりません。
595-
"500":
596-
description: サーバー内部エラー。
670+
$ref: "#/components/schemas/Error"
671+
"500":
672+
description: サーバー内部エラー
673+
content:
674+
application/json:
675+
schema:
676+
$ref: "#/components/schemas/Error"

0 commit comments

Comments
 (0)