Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: 기업정보 입력 API 관련 Swagger 명세 추가 #12

Merged
merged 1 commit into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
import com.swOnCampus.AIPlatform.domain.member.entity.Member;
import com.swOnCampus.AIPlatform.global.annotation.LoginMember;
import com.swOnCampus.AIPlatform.global.response.ApiResponse;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
Expand All @@ -15,13 +20,28 @@
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@Tag(name = "기업정보 입력에 따른 컨설팅 결과 API", description = "기업정보 입력/컨설팅 요약 결과 조회 관련 API")
@RequiredArgsConstructor
@RestController
@RequestMapping("/api/v1/consulting")
public class ConsultingController {

private final CompanyService companyService;

@Operation(summary = "기업정보 입력 API 요청", description = "AI 컨설팅에 필요한 기업정보 입력 API 요청")
@ApiResponses(value = {
@io.swagger.v3.oas.annotations.responses.ApiResponse(
responseCode = "COMMON200",
description = "요청 성공",
content = {
@Content(
schema = @Schema(
implementation = CompanyInfoRequest.class
)
)
}
)
})
@PostMapping()
public ResponseEntity<ApiResponse<?>> createConsulting(
@LoginMember Member member,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
package com.swOnCampus.AIPlatform.domain.consulting.web.dto.request;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;

public record CompanyInfoRequest(
@NotBlank(message="회사명을 입력해주세요.")
@Schema(description = "회사명을 입력해주세요.", example = "company")
@NotBlank(message = "회사명을 입력해주세요.")
String name,
@NotBlank(message="기업규모를 입력해주세요.")
@Schema(description = "기업규모를 입력해주세요.", example = "Small")
@NotBlank(message = "기업규모를 입력해주세요.")
String companySize,
@NotBlank(message="산업 분야를 입력해주세요.")
@Schema(description = "산업 분야를 입력해주세요.", example = "Retail")
@NotBlank(message = "산업 분야를 입력해주세요.")
String industry,
@NotBlank(message="Pain Point를 입력해주세요.")
@Schema(description = "Pain point를 입력해주세요.", example = "String")
@NotBlank(message = "Pain Point를 입력해주세요.")
String painPoint
) {

}
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package com.swOnCampus.AIPlatform.domain.consulting.web.dto.response;

import io.swagger.v3.oas.annotations.media.Schema;

public record ConsultingResponse(
@Schema(description = "컨설팅 요약 내용", example = "summary")
String summary
) {

Expand Down
Loading