diff --git a/src/main/java/com/vmis/interfaceapp/controller/VehicleInterfaceController.java b/src/main/java/com/vmis/interfaceapp/controller/VehicleInterfaceController.java index 1da1cfd..900aab8 100644 --- a/src/main/java/com/vmis/interfaceapp/controller/VehicleInterfaceController.java +++ b/src/main/java/com/vmis/interfaceapp/controller/VehicleInterfaceController.java @@ -8,6 +8,9 @@ import com.vmis.interfaceapp.model.ledger.LedgerRequest; import com.vmis.interfaceapp.model.ledger.LedgerResponse; import com.vmis.interfaceapp.service.RequestEnricher; import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.ExampleObject; +import io.swagger.v3.oas.annotations.parameters.RequestBody; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -114,7 +117,35 @@ public class VehicleInterfaceController { * @return ResponseEntity<Envelope<BasicResponse>> 조회 결과를 담은 응답 객체 HTTP 상태 코드, 헤더, 응답 바디를 포함 */ @PostMapping(value = "/basic", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) - @Operation(summary = "자동차기본사항조회", description = "시군구연계 자동차기본사항조회 인터페이스. 요청 바디를 모델로 받아 정부시스템으로 전달합니다.") + @Operation( + summary = "자동차기본사항조회", + description = "시군구연계 자동차기본사항조회 인터페이스. 요청 바디를 모델로 받아 정부시스템으로 전달합니다.", + requestBody = @RequestBody( + content = @Content( + mediaType = MediaType.APPLICATION_JSON_VALUE, + examples = @ExampleObject( + name = "기본사항조회 예제", + value = """ + { + "data": [ + { + "INFO_SYS_ID": "41-345", + "INFO_SYS_IP": "105.19.10.135", + "SIGUNGU_CODE": "41460", + "CNTC_INFO_CODE": "AC1_FD11_01", + "CHARGER_ID": "", + "CHARGER_IP": "", + "CHARGER_NM": "", + "VHRNO": "12가3456", + "ONES_INFORMATION_OPEN": "Y" + } + ] + } + """ + ) + ) + ) + ) public ResponseEntity> basic( @org.springframework.web.bind.annotation.RequestBody Envelope envelope ) { @@ -184,7 +215,35 @@ public class VehicleInterfaceController { * @return ResponseEntity<Envelope<LedgerResponse>> 등록원부 조회 결과를 담은 응답 객체 HTTP 상태 코드, 헤더, 응답 바디를 포함 */ @PostMapping(value = "/ledger", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) - @Operation(summary = "자동차등록원부(갑)", description = "시군구연계 자동차등록원부(갑) 인터페이스. 요청 바디를 모델로 받아 정부시스템으로 전달합니다.") + @Operation( + summary = "자동차등록원부(갑)", + description = "시군구연계 자동차등록원부(갑) 인터페이스. 요청 바디를 모델로 받아 정부시스템으로 전달합니다.", + requestBody = @RequestBody( + content = @Content( + mediaType = MediaType.APPLICATION_JSON_VALUE, + examples = @ExampleObject( + name = "등록원부 조회 예제", + value = """ + { + "data": [ + { + "INFO_SYS_ID": "41-345", + "INFO_SYS_IP": "105.19.10.135", + "SIGUNGU_CODE": "41460", + "CNTC_INFO_CODE": "AC1_FD11_02", + "CHARGER_ID": "", + "CHARGER_IP": "", + "CHARGER_NM": "", + "VHRNO": "12가3456", + "ONES_INFORMATION_OPEN": "Y" + } + ] + } + """ + ) + ) + ) + ) public ResponseEntity> ledger( @org.springframework.web.bind.annotation.RequestBody Envelope envelope ) { diff --git a/src/main/java/com/vmis/interfaceapp/model/basic/BasicRequest.java b/src/main/java/com/vmis/interfaceapp/model/basic/BasicRequest.java index 4eb2ac8..b9203eb 100644 --- a/src/main/java/com/vmis/interfaceapp/model/basic/BasicRequest.java +++ b/src/main/java/com/vmis/interfaceapp/model/basic/BasicRequest.java @@ -14,15 +14,15 @@ import lombok.Setter; public class BasicRequest { // 본문 공통 메타 - @Schema(description = "정보시스템ID") + @Schema(description = "정보시스템ID", example = "41-345") @JsonProperty("INFO_SYS_ID") private String infoSysId; - @Schema(description = "정보시스템IP") + @Schema(description = "정보시스템IP", example = "105.19.10.135") @JsonProperty("INFO_SYS_IP") private String infoSysIp; - @Schema(description = "시군구코드") + @Schema(description = "시군구코드", example = "41460") @JsonProperty("SIGUNGU_CODE") private String sigunguCode; @@ -31,15 +31,15 @@ public class BasicRequest { @JsonProperty("CNTC_INFO_CODE") private String cntcInfoCode; - @Schema(description = "담당자ID") + @Schema(description = "담당자ID", example = "") @JsonProperty("CHARGER_ID") private String chargerId; - @Schema(description = "담당자IP") + @Schema(description = "담당자IP", example = "") @JsonProperty("CHARGER_IP") private String chargerIp; - @Schema(description = "담당자명(사용자)") + @Schema(description = "담당자명(사용자)", example = "") @JsonProperty("CHARGER_NM") private String chargerNm; @@ -59,6 +59,7 @@ public class BasicRequest { @JsonProperty("VIN") private String vin; + /* // 추가 항목 (명세 샘플 기준) @Schema(description = "개인정보공개", example = "Y") @JsonProperty("ONES_INFORMATION_OPEN") @@ -84,5 +85,6 @@ public class BasicRequest { @Schema(description = "내역표시") @JsonProperty("DETAIL_EXPRESSION") private String detailExpression; + */ } diff --git a/src/main/java/com/vmis/interfaceapp/model/ledger/LedgerRequest.java b/src/main/java/com/vmis/interfaceapp/model/ledger/LedgerRequest.java index af66d45..5a8d3b5 100644 --- a/src/main/java/com/vmis/interfaceapp/model/ledger/LedgerRequest.java +++ b/src/main/java/com/vmis/interfaceapp/model/ledger/LedgerRequest.java @@ -14,15 +14,15 @@ import lombok.Setter; public class LedgerRequest { // 본문 공통 메타 - @Schema(description = "정보시스템ID") + @Schema(description = "정보시스템ID", example = "41-345") @JsonProperty("INFO_SYS_ID") private String infoSysId; - @Schema(description = "정보시스템IP") + @Schema(description = "정보시스템IP", example = "105.19.10.135") @JsonProperty("INFO_SYS_IP") private String infoSysIp; - @Schema(description = "시군구코드") + @Schema(description = "시군구코드", example = "41460") @JsonProperty("SIGUNGU_CODE") private String sigunguCode; @@ -31,15 +31,15 @@ public class LedgerRequest { @JsonProperty("CNTC_INFO_CODE") private String cntcInfoCode; - @Schema(description = "담당자ID") + @Schema(description = "담당자ID", example = "") @JsonProperty("CHARGER_ID") private String chargerId; - @Schema(description = "담당자IP") + @Schema(description = "담당자IP", example = "") @JsonProperty("CHARGER_IP") private String chargerIp; - @Schema(description = "담당자명(사용자)") + @Schema(description = "담당자명(사용자)", example = "") @JsonProperty("CHARGER_NM") private String chargerNm; @@ -47,6 +47,8 @@ public class LedgerRequest { @JsonProperty("VHRNO") private String vhrno; + /* + // 추가 항목 (명세 샘플 기준) @Schema(description = "개인정보공개") @JsonProperty("ONES_INFORMATION_OPEN") private String onesInformationOpen; @@ -75,5 +77,6 @@ public class LedgerRequest { @Schema(description = "조회구분코드") @JsonProperty("INQIRE_SE_CODE") private String inqireSeCode; + */ } diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index 324dffa..ffc2a64 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -12,7 +12,7 @@ vmis: chargerIp: "" chargerNm: "" gpki: - enabled: "Y" + enabled: "N" useSign: true charset: "UTF-8" certServerId: "SVR5640020001"