` tags. Drop it inside a `` tag in any HTML page:
+
+```html
+
+
+
+```
+
+---
+
+## Swagger UI
+
+Interactive API docs are available at:
+
+```
+http://localhost:8080/swagger-ui.html
+```
+
+Use it to explore and test the `/api/banner` endpoint directly from the browser — upload a file, toggle dark mode, and see the live JSON response.
+
+The raw OpenAPI spec (JSON) is at:
+
+```
+http://localhost:8080/v2/api-docs
+```
diff --git a/pom.xml b/pom.xml
index 228d8db..e33e861 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,6 +22,7 @@
UTF-8
1.8
+ 1.18.30
@@ -37,6 +38,7 @@
org.projectlombok
lombok
+ 1.18.30
org.springframework.boot
@@ -58,6 +60,21 @@
1.0.0.RELEASE
test
+
+ io.springfox
+ springfox-swagger2
+ 2.9.2
+
+
+ io.springfox
+ springfox-swagger-ui
+ 2.9.2
+
+
+ com.google.guava
+ guava
+ 20.0
+
@@ -77,6 +94,16 @@
org.springframework.boot
spring-boot-maven-plugin
+
+ --add-opens=java.base/java.lang=ALL-UNNAMED
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+ --add-opens=java.base/java.lang=ALL-UNNAMED
+
diff --git a/src/main/java/be/ordina/cloudfoundry/config/SwaggerConfig.java b/src/main/java/be/ordina/cloudfoundry/config/SwaggerConfig.java
new file mode 100644
index 0000000..80447aa
--- /dev/null
+++ b/src/main/java/be/ordina/cloudfoundry/config/SwaggerConfig.java
@@ -0,0 +1,23 @@
+package be.ordina.cloudfoundry.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
+
+@Configuration
+@EnableSwagger2
+public class SwaggerConfig {
+
+ @Bean
+ public Docket api() {
+ return new Docket(DocumentationType.SWAGGER_2)
+ .select()
+ .apis(RequestHandlerSelectors.basePackage("be.ordina.cloudfoundry.controller"))
+ .paths(PathSelectors.ant("/api/**"))
+ .build();
+ }
+}
diff --git a/src/main/java/be/ordina/cloudfoundry/controller/BannerRestController.java b/src/main/java/be/ordina/cloudfoundry/controller/BannerRestController.java
new file mode 100644
index 0000000..296ce84
--- /dev/null
+++ b/src/main/java/be/ordina/cloudfoundry/controller/BannerRestController.java
@@ -0,0 +1,46 @@
+package be.ordina.cloudfoundry.controller;
+
+import be.ordina.cloudfoundry.banner.Banner;
+import be.ordina.cloudfoundry.banner.BannerGenerator;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+@Slf4j
+@RestController
+@RequestMapping("/api/banner")
+@Api(value = "Banner Generator", description = "Generate Spring Boot ASCII banners from images")
+public class BannerRestController {
+
+ @Autowired
+ private BannerGenerator bannerGenerator;
+
+ @ApiOperation(value = "Generate a banner from an image", response = Map.class)
+ @RequestMapping(method = RequestMethod.POST, consumes = MediaType.MULTIPART_FORM_DATA_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
+ public ResponseEntity