feat: MaterialApi.php Swagger 점검 및 개선 (Phase 3-2)
- MaterialStoreRequest.php 생성 (검증 로직 분리) - MaterialUpdateRequest.php 생성 (검증 로직 분리) - MaterialApi.php 경로 수정 (/api/v1/products/materials) - MaterialController.php Swagger 주석 제거, FormRequest 적용 - lang/ko/message.php material 메시지 키 추가 - SAM API Development Rules 준수 완료
This commit is contained in:
@@ -151,16 +151,16 @@ class MaterialApi
|
||||
{
|
||||
/**
|
||||
* @OA\Get(
|
||||
* path="/api/v1/materials",
|
||||
* path="/api/v1/products/materials",
|
||||
* summary="자재 목록 조회",
|
||||
* description="자재 목록을 페이징으로 반환합니다. (q로 코드/이름/태그 검색, category로 분류 필터)",
|
||||
* tags={"Material"},
|
||||
* security={{"ApiKeyAuth": {}},{"BearerAuth": {}}},
|
||||
*
|
||||
* @OA\Parameter(ref="#/components/parameters/Page"),
|
||||
* @OA\Parameter(ref="#/components/parameters/Size"),
|
||||
* @OA\Parameter(name="q", in="query", required=false, @OA\Schema(type="string"), description="검색어(이름/코드/태그 등)"),
|
||||
* @OA\Parameter(name="category", in="query", required=false, @OA\Schema(type="integer"), description="카테고리 ID"),
|
||||
* @OA\Parameter(name="page", in="query", required=false, @OA\Schema(type="integer", example=1)),
|
||||
* @OA\Parameter(name="per_page", in="query", required=false, @OA\Schema(type="integer", example=20)),
|
||||
*
|
||||
* @OA\Response(
|
||||
* response=200, description="자재 목록 조회 성공",
|
||||
@@ -187,7 +187,7 @@ public function index() {}
|
||||
|
||||
/**
|
||||
* @OA\Post(
|
||||
* path="/api/v1/materials",
|
||||
* path="/api/v1/products/materials",
|
||||
* summary="자재 등록",
|
||||
* description="자재를 등록합니다. item_name/specification은 name+attributes를 기반으로 서버에서 자동 생성됩니다.",
|
||||
* tags={"Material"},
|
||||
@@ -214,7 +214,7 @@ public function store() {}
|
||||
|
||||
/**
|
||||
* @OA\Get(
|
||||
* path="/api/v1/materials/{id}",
|
||||
* path="/api/v1/products/materials/{id}",
|
||||
* summary="자재 단건 조회",
|
||||
* tags={"Material"},
|
||||
* security={{"ApiKeyAuth": {}},{"BearerAuth": {}}},
|
||||
@@ -240,7 +240,7 @@ public function show() {}
|
||||
|
||||
/**
|
||||
* @OA\Put(
|
||||
* path="/api/v1/materials/{id}",
|
||||
* path="/api/v1/products/materials/{id}",
|
||||
* summary="자재 수정(전체)",
|
||||
* description="자재를 수정합니다. name/attributes 변경 시 item_name/specification이 서버에서 재계산됩니다.",
|
||||
* tags={"Material"},
|
||||
@@ -270,7 +270,7 @@ public function updatePut() {}
|
||||
|
||||
/**
|
||||
* @OA\Patch(
|
||||
* path="/api/v1/materials/{id}",
|
||||
* path="/api/v1/products/materials/{id}",
|
||||
* summary="자재 부분 수정",
|
||||
* description="자재의 일부 필드를 수정합니다. name/attributes 변경 시 item_name/specification이 서버에서 재계산됩니다.",
|
||||
* tags={"Material"},
|
||||
@@ -300,7 +300,7 @@ public function updatePatch() {}
|
||||
|
||||
/**
|
||||
* @OA\Delete(
|
||||
* path="/api/v1/materials/{id}",
|
||||
* path="/api/v1/products/materials/{id}",
|
||||
* summary="자재 삭제",
|
||||
* description="자재를 소프트 삭제합니다.",
|
||||
* tags={"Material"},
|
||||
|
||||
Reference in New Issue
Block a user