package com.aip.gateway.api.controller;

import com.aip.gateway.api.repository.AppRepository;
import com.aip.gateway.api.service.IApiDummyService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletRequest;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@Tag(name = "ApiDummy", description = "Dummy API")
@RestController
@RequiredArgsConstructor
@CrossOrigin
@Validated
@RequestMapping("/v1/aip-api/dummy")
public class ApiDummyController extends  BaseController {

    private final AppRepository appRepo;
    private final IApiDummyService service;

    @Operation(summary = "API Dummy", description = "Dummy API.")
    @ApiResponse(responseCode = "200", description = "API Call Success.")
    //@ApiOperation(value = "dummy", response = String.class)
    @GetMapping(value = "", produces = {"application/json; charset=utf8"})
    public ResponseEntity<String> getDummy(HttpServletRequest request) {
        //return ResponseEntity.ok().body(this.service.getDummy());
        return ResponseEntity.status(HttpStatus.BAD_REQUEST).body("API Call Failed.");
    }

}
