refactor: remove sample HTTP tool integration
Some checks failed
Deploy to OCIWP / deploy (push) Has been cancelled
Some checks failed
Deploy to OCIWP / deploy (push) Has been cancelled
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
package io.shinhanlife.dap.mcc.biz.smp.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/** Tool response for the HTTP integration sample. */
|
||||
public record SampleHttpStatusResponse(
|
||||
@Schema(description = "External API processing status", example = "OK") String status,
|
||||
@Schema(description = "External API response message", example = "Sample API is available") String message) {
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
package io.shinhanlife.dap.mcc.biz.smp.usecase;
|
||||
|
||||
import io.shinhanlife.dap.lib.annotation.ToolHint;
|
||||
import io.shinhanlife.dap.mcc.biz.smp.dto.SampleHttpStatusResponse;
|
||||
import org.springaicommunity.mcp.annotation.McpTool;
|
||||
|
||||
/** Sample Tool that demonstrates a configured HTTP API integration. */
|
||||
public interface SampleHttpStatusUseCase {
|
||||
|
||||
@McpTool(name = "smp_sample_status",
|
||||
title = "Sample external HTTP API status",
|
||||
description = "Calls the configured sample HTTP API and returns its status.")
|
||||
@ToolHint(register = false, categoryKey = "smp", mappingId = "HTTP_SAMPLE_001")
|
||||
SampleHttpStatusResponse execute();
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
package io.shinhanlife.dap.mcc.biz.smp.usecase.impl;
|
||||
|
||||
import io.shinhanlife.dap.mcc.biz.smp.dto.SampleHttpStatusResponse;
|
||||
import io.shinhanlife.dap.mcc.biz.smp.usecase.SampleHttpStatusUseCase;
|
||||
import io.shinhanlife.dap.mcc.infra.itrf.http.sample.SampleHttpApiClient;
|
||||
import io.shinhanlife.dap.mcc.infra.itrf.http.sample.SampleHttpApiResponse;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class SampleHttpStatusUseCaseImpl implements SampleHttpStatusUseCase {
|
||||
|
||||
private final SampleHttpApiClient sampleHttpApiClient;
|
||||
|
||||
@Override
|
||||
public SampleHttpStatusResponse execute() {
|
||||
SampleHttpApiResponse response = sampleHttpApiClient.getStatus();
|
||||
return new SampleHttpStatusResponse(response.status(), response.message());
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package io.shinhanlife.dap.mcc.infra.itrf.http.sample;
|
||||
|
||||
import io.shinhanlife.dap.lib.integration.http.component.AxhubHttpComponent;
|
||||
import io.shinhanlife.dap.lib.integration.http.component.AxhubHttpDomain;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/** Example of a Tool-specific HTTP client using the configured AX HUB HTTP domain. */
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class SampleHttpApiClient {
|
||||
|
||||
private final AxhubHttpComponent http;
|
||||
|
||||
public SampleHttpApiResponse getStatus() {
|
||||
return http.call(AxhubHttpDomain.SAMPLE, "/status", null, SampleHttpApiResponse.class);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package io.shinhanlife.dap.mcc.infra.itrf.http.sample;
|
||||
|
||||
/** DTO matching the external API JSON response: { "status": "OK", "message": "..." }. */
|
||||
public record SampleHttpApiResponse(String status, String message) {
|
||||
}
|
||||
Reference in New Issue
Block a user