Skip to content

MODLDI-29: New API to upload a file to S3 bucket#82

Merged
pkjacob merged 8 commits intomasterfrom
pjacob/MODLDI-29
Feb 27, 2026
Merged

MODLDI-29: New API to upload a file to S3 bucket#82
pkjacob merged 8 commits intomasterfrom
pjacob/MODLDI-29

Conversation

@pkjacob
Copy link
Contributor

@pkjacob pkjacob commented Feb 26, 2026

This API is needed for creating karate tests for data import
In future, this API can be used by UI also.

Copilot AI review requested due to automatic review settings February 26, 2026 14:24
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request introduces a new API endpoint for uploading files to an S3 bucket, enabling users to upload source files to a tenant-specific folder before initiating the import process. The implementation follows established patterns in the codebase with a clean separation between controller, service, and storage layers.

Changes:

  • Added new /linked-data-import/files POST endpoint for file uploads with optional custom file naming
  • Implemented upload service layer with validation for empty files and missing file names
  • Extended S3Service with upload capability using tenant-scoped folder organization

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/main/resources/swagger.api/mod-linked-data-import.yaml Added OpenAPI specification for the upload endpoint with multipart/form-data support
src/main/java/org/folio/linked/data/imprt/controller/UploadController.java New controller implementing UploadApi interface, delegates to UploadService
src/main/java/org/folio/linked/data/imprt/service/upload/UploadService.java Service interface defining upload contract
src/main/java/org/folio/linked/data/imprt/service/upload/UploadServiceImpl.java Service implementation with file validation and S3 upload orchestration
src/main/java/org/folio/linked/data/imprt/service/s3/S3Service.java Added upload method to S3Service interface
src/main/java/org/folio/linked/data/imprt/service/s3/S3ServiceImpl.java Implemented upload method with tenant folder scoping and logging
src/test/java/org/folio/linked/data/imprt/controller/UploadControllerTest.java Unit tests for controller covering success and error scenarios
src/test/java/org/folio/linked/data/imprt/service/upload/UploadServiceImplTest.java Comprehensive unit tests for upload service validation and error handling
src/test/java/org/folio/linked/data/imprt/service/s3/S3ServiceTest.java Added test for S3 upload with tenant folder verification
descriptors/ModuleDescriptor-template.json Added permission definition and handler configuration for the new endpoint

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings February 27, 2026 14:24
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings February 27, 2026 15:01
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sonarqubecloud
Copy link

@pkjacob pkjacob merged commit 698cc0d into master Feb 27, 2026
6 checks passed
@pkjacob pkjacob deleted the pjacob/MODLDI-29 branch February 27, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants