[BACKLOG-48508] - add projectDir to CRUD APIs#1344
[BACKLOG-48508] - add projectDir to CRUD APIs#1344abryant-hv wants to merge 2 commits intomasterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR extends the Data Access Connection REST API to accept an optional projectDir query parameter on connection CRUD operations, enabling callers (and potential subclasses) to run operations in a project-scoped context.
Changes:
- Added optional
projectDirquery parameter to relevant CRUD endpoints inconnection-api.yaml. - Updated
ConnectionServiceCRUD method signatures to includeprojectDir, and added overloads for backward compatibility. - Centralized
ConnectionServiceException→WebApplicationExceptionmapping via a helper method and adjusted some member visibility for subclassing.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| core/src/main/resources/connection-api.yaml | Adds projectDir query parameter to CRUD endpoints and tweaks response descriptions. |
| core/src/main/java/org/pentaho/platform/dataaccess/datasource/wizard/service/impl/ConnectionService.java | Updates CRUD API method signatures to accept projectDir, adds backward-compatible overloads, and refactors exception handling. |
Comments suppressed due to low confidence (3)
core/src/main/resources/connection-api.yaml:94
- The 200 response description says the body will be empty, but the response schema is
IDatabaseConnection(i.e., a non-empty JSON body is documented). Please align the description and the documented response content (either remove the response body schema or update the description to indicate anIDatabaseConnectionis returned).
'200':
description: Successfully created database connection. The body will be empty.
content:
application/json:
schema:
$ref: '#/components/schemas/IDatabaseConnection'
core/src/main/resources/connection-api.yaml:224
- This 200 response is documented with
text/plainstring content, but the description says the body will be empty. If the endpoint returns an empty string (as a body) then document that explicitly; otherwise remove the response body content to match an empty-body 200 response.
'200':
description: Successfully deleted connection. The body will be empty.
content:
text/plain:
schema:
type: string
'304':
core/src/main/resources/connection-api.yaml:260
- This endpoint’s 200 response includes
text/plainstring content, but the description says the body will be empty. Please reconcile the OpenAPI contract (either document that the body is an empty string or remove the response body content if it’s truly empty).
'200':
description: Successfully added connection. The body will be empty.
content:
text/plain:
schema:
type: string
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
This comment has been minimized.
This comment has been minimized.
28c9a45 to
52e6164
Compare
This comment has been minimized.
This comment has been minimized.
Numerous updates, mostly to error handling, so return codes, messages, and content types match the 11.0 API. Note that quite a few of these error handling cases are *not* following best practices, but they are this way to be compatible with the old API. For example, in some cases we return a 500 instead of a 403. We also have inconsistent error response content, sometimes with a default message and sometimes with a meaningful string. All this is to match the existing API.
52e6164 to
10dde5c
Compare
|
Note:Frogbot also supports Contextual Analysis, Secret Detection, IaC and SAST Vulnerabilities Scanning. This features are included as part of the JFrog Advanced Security package, which isn't enabled on your system. |
✅ Build finished in 20m 48sBuild command: mvn clean verify -B -e -Daudit -Djs.no.sandbox -pl core👌 All tests passed! Tests run: 419, Failures: 0, Skipped: 1 Test Results ℹ️ This is an automatic message |
|
Superseded by #1346 |

0 New Issues
5 Fixed Issues
1 Accepted Issue
No description provided.