package marketing.heyday.hartmann.fotodocumentation.rest.jackson;

import java.util.HashSet;
import java.util.Set;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import io.swagger.v3.jaxrs2.integration.resources.OpenApiResource;
import io.swagger.v3.oas.annotations.OpenAPIDefinition;
import io.swagger.v3.oas.annotations.info.Contact;
import io.swagger.v3.oas.annotations.info.Info;
import io.swagger.v3.oas.annotations.servers.Server;
import jakarta.ws.rs.ApplicationPath;
import jakarta.ws.rs.core.Application;
import jakarta.ws.rs.core.MediaType;
import marketing.heyday.hartmann.fotodocumentation.rest.*;

/**
 * 
 * 
 * <p>Copyright: Copyright (c) 2017</p>
 * <p>Company: heyday marketing GmbH</p>
 * @author <a href="mailto:p.verboom@heyday.marketing">Patrick Verboom</a>
 * @version 1.0
 * 
 * created: 18 Oct 2017
 */
@OpenAPIDefinition(info = @Info(title = "Hartmann Photo upload API", version = "1.0", description = "All available routes for the Hartmann Photo upload API", contact = @Contact(url = "https://localhost", name = "Patrick Verboom", email = "p.verboom@heyday.marketing")), servers = {
		@Server(description = "development", url = "http://localhost"),
		@Server(description = "integration", url = "http://localhost"),
		@Server(description = "production", url = "http://localhost")
})
@ApplicationPath("/api")
public class ApplicationConfigApi extends Application {
	private static final Log LOG = LogFactory.getLog(ApplicationConfigApi.class);
	public static final String JSON_OUT = MediaType.APPLICATION_JSON + "; charset=utf-8";

	@Override
	public Set<Class<?>> getClasses() {
		Set<Class<?>> retVal = new HashSet<>();
		retVal.add(OpenApiResource.class);
		retVal.add(ValidatedMessageBodyReader.class);
		retVal.add(LoginResource.class);
		retVal.add(MonitoringResource.class);
		retVal.add(CustomerPictureResource.class);
		retVal.add(CustomerResource.class);
		retVal.add(PictureResource.class);
		LOG.info("returning rest api classes " + retVal);
		return retVal;
	}
}
