diff --git a/job-service/server/pom.xml b/job-service/server/pom.xml
index 362ae342a..45fe5befc 100644
--- a/job-service/server/pom.xml
+++ b/job-service/server/pom.xml
@@ -13,6 +13,7 @@
11
+ 1.5.4
@@ -53,6 +54,11 @@
flyway-core
runtime
+
+ org.springdoc
+ springdoc-openapi-ui
+ ${springdoc-ui.version}
+
org.springframework.boot
spring-boot-starter-test
diff --git a/job-service/server/src/main/resources/application.yml b/job-service/server/src/main/resources/application.yml
index 50c0d4b10..3dcaedeee 100644
--- a/job-service/server/src/main/resources/application.yml
+++ b/job-service/server/src/main/resources/application.yml
@@ -41,3 +41,12 @@ verapdf:
listening-queue:
name: ${amqp.server.listening.queue.name}
max-size: ${amqp.server.listening.queue.max.size}
+
+springdoc:
+ api-docs:
+ path: /jobs/docs
+ enabled: true
+ swagger-ui:
+ path: /jobs/swagger
+ operations-sorter: method
+ enabled: true
\ No newline at end of file
diff --git a/local-storage-service/server/pom.xml b/local-storage-service/server/pom.xml
index b4c56f0a2..797188e14 100644
--- a/local-storage-service/server/pom.xml
+++ b/local-storage-service/server/pom.xml
@@ -16,6 +16,7 @@
11
+ 1.5.4
@@ -51,6 +52,11 @@
flyway-core
runtime
+
+ org.springdoc
+ springdoc-openapi-ui
+ ${springdoc-ui.version}
+
org.springframework.boot
spring-boot-starter-test
diff --git a/local-storage-service/server/src/main/java/org/verapdf/webapp/localstorageservice/server/controller/FileController.java b/local-storage-service/server/src/main/java/org/verapdf/webapp/localstorageservice/server/controller/FileController.java
index 4a7c4396f..3c7f26518 100644
--- a/local-storage-service/server/src/main/java/org/verapdf/webapp/localstorageservice/server/controller/FileController.java
+++ b/local-storage-service/server/src/main/java/org/verapdf/webapp/localstorageservice/server/controller/FileController.java
@@ -30,13 +30,14 @@ public FileController(StoredFileService storedFileService) {
this.storedFileService = storedFileService;
}
- @PostMapping
+ @PostMapping(consumes = {MediaType.MULTIPART_FORM_DATA_VALUE, MediaType.APPLICATION_JSON_VALUE})
public ResponseEntity uploadFile(@RequestPart("file") MultipartFile file,
- @RequestPart(required = false) @Pattern(regexp = "^[\\da-fA-F]{32}$") String contentMD5) throws VeraPDFBackendException {
+ @RequestPart(required = false)
+ @Pattern(regexp = "^[\\da-fA-F]{32}$") String contentMD5) throws VeraPDFBackendException {
StoredFileDTO storedFileDTO = storedFileService.saveStoredFile(file, contentMD5);
URI uri = MvcUriComponentsBuilder
.fromMethodName(FileController.class,
- "getFileData", storedFileDTO.getId())
+ "getFileData", storedFileDTO.getId())
.build()
.encode()
.toUri();
diff --git a/local-storage-service/server/src/main/resources/application.yml b/local-storage-service/server/src/main/resources/application.yml
index 13f567284..d442927f4 100644
--- a/local-storage-service/server/src/main/resources/application.yml
+++ b/local-storage-service/server/src/main/resources/application.yml
@@ -30,3 +30,12 @@ verapdf:
files:
min-space-threshold: ${localstorage.disk.min.space.threshold:5GB}
base-dir: /opt/verapdf/localstorageservice/files
+
+springdoc:
+ api-docs:
+ path: /files/docs
+ enabled: true
+ swagger-ui:
+ path: /files/swagger
+ operations-sorter: method
+ enabled: true