Skip to content

feat(api): Add source validation endpoint#641

Merged
iambriccardo merged 3 commits intomainfrom
riccardo/add-endpoint
Mar 26, 2026
Merged

feat(api): Add source validation endpoint#641
iambriccardo merged 3 commits intomainfrom
riccardo/add-endpoint

Conversation

@iambriccardo
Copy link
Copy Markdown
Contributor

@iambriccardo iambriccardo commented Mar 25, 2026

This PR adds an endpoint to perform source validation given a config. It makes sure that the supplied source config is usable from the ETL API.

@iambriccardo iambriccardo marked this pull request as ready for review March 25, 2026 14:00
@iambriccardo iambriccardo requested a review from a team as a code owner March 25, 2026 14:00
Copilot AI review requested due to automatic review settings March 25, 2026 14:00
Copy link
Copy Markdown

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

Adds a new ETL API endpoint to validate a source configuration (similar to existing destination/pipeline validation) and returns structured validation failures instead of rejecting the request.

Changes:

  • Introduces POST /v1/sources/validate with ValidateSourceRequest/Response and ValidationFailureResponse.
  • Wires the new endpoint + OpenAPI schemas into the Actix server startup.
  • Extends the test harness and adds integration tests for trusted-username validation behavior.

Reviewed changes

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

File Description
etl-api/src/routes/sources.rs Adds request/response types and the validate_source route implementation.
etl-api/src/startup.rs Registers the new route and includes schemas/paths in OpenAPI.
etl-api/tests/support/test_app.rs Adds a validate_source helper for authenticated test requests.
etl-api/tests/sources.rs Adds integration tests covering success/failure cases for source validation.

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

@coveralls
Copy link
Copy Markdown

coveralls commented Mar 25, 2026

Coverage Status

coverage: 77.74% (-0.3%) from 77.999%
when pulling ecf7eb5 on riccardo/add-endpoint
into 27e8b94 on main.

@iambriccardo iambriccardo merged commit 0e18d8f into main Mar 26, 2026
11 checks passed
@iambriccardo iambriccardo deleted the riccardo/add-endpoint branch March 26, 2026 08:47
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