diff --git a/api/swagger.yml b/api/swagger.yml
index 5328679b8ff..7c6561c25ce 100644
--- a/api/swagger.yml
+++ b/api/swagger.yml
@@ -5754,6 +5754,8 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/PullRequest"
+ 400:
+ $ref: "#/components/responses/ValidationError"
401:
$ref: "#/components/responses/Unauthorized"
404:
@@ -5762,25 +5764,6 @@ paths:
description: too many requests
default:
$ref: "#/components/responses/ServerError"
- delete:
- tags:
- - pulls
- - experimental
- operationId: deletePullRequest
- summary: delete pull request
- responses:
- 204:
- description: pull request deleted successfully
- 401:
- $ref: "#/components/responses/Unauthorized"
- 403:
- $ref: "#/components/responses/Forbidden"
- 404:
- $ref: "#/components/responses/NotFound"
- 420:
- description: too many requests
- default:
- $ref: "#/components/responses/ServerError"
patch:
tags:
- pulls
@@ -5794,8 +5777,10 @@ paths:
schema:
$ref: "#/components/schemas/PullRequestBasic"
responses:
- 204:
- description: pull request deleted successfully
+ 200:
+ description: pull request updated successfully
+ 400:
+ $ref: "#/components/responses/ValidationError"
401:
$ref: "#/components/responses/Unauthorized"
403:
diff --git a/clients/java-legacy/README.md b/clients/java-legacy/README.md
index 64a2cf31622..bb603a63136 100644
--- a/clients/java-legacy/README.md
+++ b/clients/java-legacy/README.md
@@ -191,7 +191,6 @@ Class | Method | HTTP request | Description
*ExperimentalApi* | [**createPresignMultipartUpload**](docs/ExperimentalApi.md#createPresignMultipartUpload) | **POST** /repositories/{repository}/branches/{branch}/staging/pmpu | Initiate a multipart upload
*ExperimentalApi* | [**createPullRequest**](docs/ExperimentalApi.md#createPullRequest) | **POST** /repositories/{repository}/pulls | create pull request
*ExperimentalApi* | [**createUserExternalPrincipal**](docs/ExperimentalApi.md#createUserExternalPrincipal) | **POST** /auth/users/{userId}/external/principals | attach external principal to user
-*ExperimentalApi* | [**deletePullRequest**](docs/ExperimentalApi.md#deletePullRequest) | **DELETE** /repositories/{repository}/pulls/{pull_request} | delete pull request
*ExperimentalApi* | [**deleteUserExternalPrincipal**](docs/ExperimentalApi.md#deleteUserExternalPrincipal) | **DELETE** /auth/users/{userId}/external/principals | delete external principal from user
*ExperimentalApi* | [**externalPrincipalLogin**](docs/ExperimentalApi.md#externalPrincipalLogin) | **POST** /auth/external/principal/login | perform a login using an external authenticator
*ExperimentalApi* | [**getExternalPrincipal**](docs/ExperimentalApi.md#getExternalPrincipal) | **GET** /auth/external/principals | describe external principal by id
@@ -250,7 +249,6 @@ Class | Method | HTTP request | Description
*ObjectsApi* | [**statObject**](docs/ObjectsApi.md#statObject) | **GET** /repositories/{repository}/refs/{ref}/objects/stat | get object metadata
*ObjectsApi* | [**uploadObject**](docs/ObjectsApi.md#uploadObject) | **POST** /repositories/{repository}/branches/{branch}/objects |
*PullsApi* | [**createPullRequest**](docs/PullsApi.md#createPullRequest) | **POST** /repositories/{repository}/pulls | create pull request
-*PullsApi* | [**deletePullRequest**](docs/PullsApi.md#deletePullRequest) | **DELETE** /repositories/{repository}/pulls/{pull_request} | delete pull request
*PullsApi* | [**getPullRequest**](docs/PullsApi.md#getPullRequest) | **GET** /repositories/{repository}/pulls/{pull_request} | get pull request
*PullsApi* | [**listPullRequests**](docs/PullsApi.md#listPullRequests) | **GET** /repositories/{repository}/pulls | list pull requests
*PullsApi* | [**updatePullRequest**](docs/PullsApi.md#updatePullRequest) | **PATCH** /repositories/{repository}/pulls/{pull_request} | update pull request
diff --git a/clients/java-legacy/api/openapi.yaml b/clients/java-legacy/api/openapi.yaml
index e08eba3296b..ba99ca1c824 100644
--- a/clients/java-legacy/api/openapi.yaml
+++ b/clients/java-legacy/api/openapi.yaml
@@ -6909,58 +6909,6 @@ paths:
x-contentType: application/json
x-accepts: application/json
/repositories/{repository}/pulls/{pull_request}:
- delete:
- operationId: deletePullRequest
- parameters:
- - explode: false
- in: path
- name: repository
- required: true
- schema:
- type: string
- style: simple
- - description: pull request id
- explode: false
- in: path
- name: pull_request
- required: true
- schema:
- type: string
- style: simple
- responses:
- "204":
- description: pull request deleted successfully
- "401":
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- description: Unauthorized
- "403":
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- description: Forbidden
- "404":
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- description: Resource Not Found
- "420":
- description: too many requests
- default:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- description: Internal Server Error
- summary: delete pull request
- tags:
- - pulls
- - experimental
- x-accepts: application/json
get:
operationId: getPullRequest
parameters:
@@ -6986,6 +6934,12 @@ paths:
schema:
$ref: '#/components/schemas/PullRequest'
description: pull request
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Validation Error
"401":
content:
application/json:
@@ -7036,8 +6990,14 @@ paths:
$ref: '#/components/schemas/PullRequestBasic'
required: true
responses:
- "204":
- description: pull request deleted successfully
+ "200":
+ description: pull request updated successfully
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Validation Error
"401":
content:
application/json:
diff --git a/clients/java-legacy/docs/ExperimentalApi.md b/clients/java-legacy/docs/ExperimentalApi.md
index c4f2bf45687..f6a51807dcb 100644
--- a/clients/java-legacy/docs/ExperimentalApi.md
+++ b/clients/java-legacy/docs/ExperimentalApi.md
@@ -9,7 +9,6 @@ Method | HTTP request | Description
[**createPresignMultipartUpload**](ExperimentalApi.md#createPresignMultipartUpload) | **POST** /repositories/{repository}/branches/{branch}/staging/pmpu | Initiate a multipart upload
[**createPullRequest**](ExperimentalApi.md#createPullRequest) | **POST** /repositories/{repository}/pulls | create pull request
[**createUserExternalPrincipal**](ExperimentalApi.md#createUserExternalPrincipal) | **POST** /auth/users/{userId}/external/principals | attach external principal to user
-[**deletePullRequest**](ExperimentalApi.md#deletePullRequest) | **DELETE** /repositories/{repository}/pulls/{pull_request} | delete pull request
[**deleteUserExternalPrincipal**](ExperimentalApi.md#deleteUserExternalPrincipal) | **DELETE** /auth/users/{userId}/external/principals | delete external principal from user
[**externalPrincipalLogin**](ExperimentalApi.md#externalPrincipalLogin) | **POST** /auth/external/principal/login | perform a login using an external authenticator
[**getExternalPrincipal**](ExperimentalApi.md#getExternalPrincipal) | **GET** /auth/external/principals | describe external principal by id
@@ -521,100 +520,6 @@ null (empty response body)
**420** | too many requests | - |
**0** | Internal Server Error | - |
-
-# **deletePullRequest**
-> deletePullRequest(repository, pullRequest)
-
-delete pull request
-
-### Example
-```java
-// Import classes:
-import io.lakefs.clients.api.ApiClient;
-import io.lakefs.clients.api.ApiException;
-import io.lakefs.clients.api.Configuration;
-import io.lakefs.clients.api.auth.*;
-import io.lakefs.clients.api.models.*;
-import io.lakefs.clients.api.ExperimentalApi;
-
-public class Example {
- public static void main(String[] args) {
- ApiClient defaultClient = Configuration.getDefaultApiClient();
- defaultClient.setBasePath("http://localhost/api/v1");
-
- // Configure HTTP basic authorization: basic_auth
- HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth");
- basic_auth.setUsername("YOUR USERNAME");
- basic_auth.setPassword("YOUR PASSWORD");
-
- // Configure API key authorization: cookie_auth
- ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth");
- cookie_auth.setApiKey("YOUR API KEY");
- // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
- //cookie_auth.setApiKeyPrefix("Token");
-
- // Configure HTTP bearer authorization: jwt_token
- HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token");
- jwt_token.setBearerToken("BEARER TOKEN");
-
- // Configure API key authorization: oidc_auth
- ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth");
- oidc_auth.setApiKey("YOUR API KEY");
- // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
- //oidc_auth.setApiKeyPrefix("Token");
-
- // Configure API key authorization: saml_auth
- ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth");
- saml_auth.setApiKey("YOUR API KEY");
- // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
- //saml_auth.setApiKeyPrefix("Token");
-
- ExperimentalApi apiInstance = new ExperimentalApi(defaultClient);
- String repository = "repository_example"; // String |
- String pullRequest = "pullRequest_example"; // String | pull request id
- try {
- apiInstance.deletePullRequest(repository, pullRequest);
- } catch (ApiException e) {
- System.err.println("Exception when calling ExperimentalApi#deletePullRequest");
- System.err.println("Status code: " + e.getCode());
- System.err.println("Reason: " + e.getResponseBody());
- System.err.println("Response headers: " + e.getResponseHeaders());
- e.printStackTrace();
- }
- }
-}
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **repository** | **String**| |
- **pullRequest** | **String**| pull request id |
-
-### Return type
-
-null (empty response body)
-
-### Authorization
-
-[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth)
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/json
-
-### HTTP response details
-| Status code | Description | Response headers |
-|-------------|-------------|------------------|
-**204** | pull request deleted successfully | - |
-**401** | Unauthorized | - |
-**403** | Forbidden | - |
-**404** | Resource Not Found | - |
-**420** | too many requests | - |
-**0** | Internal Server Error | - |
-
# **deleteUserExternalPrincipal**
> deleteUserExternalPrincipal(userId, principalId)
@@ -955,6 +860,7 @@ Name | Type | Description | Notes
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | pull request | - |
+**400** | Validation Error | - |
**401** | Unauthorized | - |
**404** | Resource Not Found | - |
**420** | too many requests | - |
@@ -1411,7 +1317,8 @@ null (empty response body)
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**204** | pull request deleted successfully | - |
+**200** | pull request updated successfully | - |
+**400** | Validation Error | - |
**401** | Unauthorized | - |
**403** | Forbidden | - |
**404** | Resource Not Found | - |
diff --git a/clients/java-legacy/docs/PullsApi.md b/clients/java-legacy/docs/PullsApi.md
index 563aa873f42..21089233533 100644
--- a/clients/java-legacy/docs/PullsApi.md
+++ b/clients/java-legacy/docs/PullsApi.md
@@ -5,7 +5,6 @@ All URIs are relative to *http://localhost/api/v1*
Method | HTTP request | Description
------------- | ------------- | -------------
[**createPullRequest**](PullsApi.md#createPullRequest) | **POST** /repositories/{repository}/pulls | create pull request
-[**deletePullRequest**](PullsApi.md#deletePullRequest) | **DELETE** /repositories/{repository}/pulls/{pull_request} | delete pull request
[**getPullRequest**](PullsApi.md#getPullRequest) | **GET** /repositories/{repository}/pulls/{pull_request} | get pull request
[**listPullRequests**](PullsApi.md#listPullRequests) | **GET** /repositories/{repository}/pulls | list pull requests
[**updatePullRequest**](PullsApi.md#updatePullRequest) | **PATCH** /repositories/{repository}/pulls/{pull_request} | update pull request
@@ -108,100 +107,6 @@ Name | Type | Description | Notes
**420** | too many requests | - |
**0** | Internal Server Error | - |
-
-# **deletePullRequest**
-> deletePullRequest(repository, pullRequest)
-
-delete pull request
-
-### Example
-```java
-// Import classes:
-import io.lakefs.clients.api.ApiClient;
-import io.lakefs.clients.api.ApiException;
-import io.lakefs.clients.api.Configuration;
-import io.lakefs.clients.api.auth.*;
-import io.lakefs.clients.api.models.*;
-import io.lakefs.clients.api.PullsApi;
-
-public class Example {
- public static void main(String[] args) {
- ApiClient defaultClient = Configuration.getDefaultApiClient();
- defaultClient.setBasePath("http://localhost/api/v1");
-
- // Configure HTTP basic authorization: basic_auth
- HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth");
- basic_auth.setUsername("YOUR USERNAME");
- basic_auth.setPassword("YOUR PASSWORD");
-
- // Configure API key authorization: cookie_auth
- ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth");
- cookie_auth.setApiKey("YOUR API KEY");
- // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
- //cookie_auth.setApiKeyPrefix("Token");
-
- // Configure HTTP bearer authorization: jwt_token
- HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token");
- jwt_token.setBearerToken("BEARER TOKEN");
-
- // Configure API key authorization: oidc_auth
- ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth");
- oidc_auth.setApiKey("YOUR API KEY");
- // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
- //oidc_auth.setApiKeyPrefix("Token");
-
- // Configure API key authorization: saml_auth
- ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth");
- saml_auth.setApiKey("YOUR API KEY");
- // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
- //saml_auth.setApiKeyPrefix("Token");
-
- PullsApi apiInstance = new PullsApi(defaultClient);
- String repository = "repository_example"; // String |
- String pullRequest = "pullRequest_example"; // String | pull request id
- try {
- apiInstance.deletePullRequest(repository, pullRequest);
- } catch (ApiException e) {
- System.err.println("Exception when calling PullsApi#deletePullRequest");
- System.err.println("Status code: " + e.getCode());
- System.err.println("Reason: " + e.getResponseBody());
- System.err.println("Response headers: " + e.getResponseHeaders());
- e.printStackTrace();
- }
- }
-}
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **repository** | **String**| |
- **pullRequest** | **String**| pull request id |
-
-### Return type
-
-null (empty response body)
-
-### Authorization
-
-[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth)
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/json
-
-### HTTP response details
-| Status code | Description | Response headers |
-|-------------|-------------|------------------|
-**204** | pull request deleted successfully | - |
-**401** | Unauthorized | - |
-**403** | Forbidden | - |
-**404** | Resource Not Found | - |
-**420** | too many requests | - |
-**0** | Internal Server Error | - |
-
# **getPullRequest**
> PullRequest getPullRequest(repository, pullRequest)
@@ -291,6 +196,7 @@ Name | Type | Description | Notes
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | pull request | - |
+**400** | Validation Error | - |
**401** | Unauthorized | - |
**404** | Resource Not Found | - |
**420** | too many requests | - |
@@ -485,7 +391,8 @@ null (empty response body)
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**204** | pull request deleted successfully | - |
+**200** | pull request updated successfully | - |
+**400** | Validation Error | - |
**401** | Unauthorized | - |
**403** | Forbidden | - |
**404** | Resource Not Found | - |
diff --git a/clients/java-legacy/src/main/java/io/lakefs/clients/api/ExperimentalApi.java b/clients/java-legacy/src/main/java/io/lakefs/clients/api/ExperimentalApi.java
index 236ac6a0a1c..7ad14af96f4 100644
--- a/clients/java-legacy/src/main/java/io/lakefs/clients/api/ExperimentalApi.java
+++ b/clients/java-legacy/src/main/java/io/lakefs/clients/api/ExperimentalApi.java
@@ -864,144 +864,6 @@ public okhttp3.Call createUserExternalPrincipalAsync(String userId, String princ
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
- /**
- * Build call for deletePullRequest
- * @param repository (required)
- * @param pullRequest pull request id (required)
- * @param _callback Callback for upload/download progress
- * @return Call to execute
- * @throws ApiException If fail to serialize the request body object
- * @http.response.details
-
- Status Code | Description | Response Headers |
- 204 | pull request deleted successfully | - |
- 401 | Unauthorized | - |
- 403 | Forbidden | - |
- 404 | Resource Not Found | - |
- 420 | too many requests | - |
- 0 | Internal Server Error | - |
-
- */
- public okhttp3.Call deletePullRequestCall(String repository, String pullRequest, final ApiCallback _callback) throws ApiException {
- Object localVarPostBody = null;
-
- // create path and map variables
- String localVarPath = "/repositories/{repository}/pulls/{pull_request}"
- .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString()))
- .replaceAll("\\{" + "pull_request" + "\\}", localVarApiClient.escapeString(pullRequest.toString()));
-
- List localVarQueryParams = new ArrayList();
- List localVarCollectionQueryParams = new ArrayList();
- Map localVarHeaderParams = new HashMap();
- Map localVarCookieParams = new HashMap();
- Map localVarFormParams = new HashMap();
-
- final String[] localVarAccepts = {
- "application/json"
- };
- final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) {
- localVarHeaderParams.put("Accept", localVarAccept);
- }
-
- final String[] localVarContentTypes = {
-
- };
- final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
- localVarHeaderParams.put("Content-Type", localVarContentType);
-
- String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" };
- return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
- }
-
- @SuppressWarnings("rawtypes")
- private okhttp3.Call deletePullRequestValidateBeforeCall(String repository, String pullRequest, final ApiCallback _callback) throws ApiException {
-
- // verify the required parameter 'repository' is set
- if (repository == null) {
- throw new ApiException("Missing the required parameter 'repository' when calling deletePullRequest(Async)");
- }
-
- // verify the required parameter 'pullRequest' is set
- if (pullRequest == null) {
- throw new ApiException("Missing the required parameter 'pullRequest' when calling deletePullRequest(Async)");
- }
-
-
- okhttp3.Call localVarCall = deletePullRequestCall(repository, pullRequest, _callback);
- return localVarCall;
-
- }
-
- /**
- * delete pull request
- *
- * @param repository (required)
- * @param pullRequest pull request id (required)
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- * @http.response.details
-
- Status Code | Description | Response Headers |
- 204 | pull request deleted successfully | - |
- 401 | Unauthorized | - |
- 403 | Forbidden | - |
- 404 | Resource Not Found | - |
- 420 | too many requests | - |
- 0 | Internal Server Error | - |
-
- */
- public void deletePullRequest(String repository, String pullRequest) throws ApiException {
- deletePullRequestWithHttpInfo(repository, pullRequest);
- }
-
- /**
- * delete pull request
- *
- * @param repository (required)
- * @param pullRequest pull request id (required)
- * @return ApiResponse<Void>
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- * @http.response.details
-
- Status Code | Description | Response Headers |
- 204 | pull request deleted successfully | - |
- 401 | Unauthorized | - |
- 403 | Forbidden | - |
- 404 | Resource Not Found | - |
- 420 | too many requests | - |
- 0 | Internal Server Error | - |
-
- */
- public ApiResponse deletePullRequestWithHttpInfo(String repository, String pullRequest) throws ApiException {
- okhttp3.Call localVarCall = deletePullRequestValidateBeforeCall(repository, pullRequest, null);
- return localVarApiClient.execute(localVarCall);
- }
-
- /**
- * delete pull request (asynchronously)
- *
- * @param repository (required)
- * @param pullRequest pull request id (required)
- * @param _callback The callback to be executed when the API call finishes
- * @return The request call
- * @throws ApiException If fail to process the API call, e.g. serializing the request body object
- * @http.response.details
-
- Status Code | Description | Response Headers |
- 204 | pull request deleted successfully | - |
- 401 | Unauthorized | - |
- 403 | Forbidden | - |
- 404 | Resource Not Found | - |
- 420 | too many requests | - |
- 0 | Internal Server Error | - |
-
- */
- public okhttp3.Call deletePullRequestAsync(String repository, String pullRequest, final ApiCallback _callback) throws ApiException {
-
- okhttp3.Call localVarCall = deletePullRequestValidateBeforeCall(repository, pullRequest, _callback);
- localVarApiClient.executeAsync(localVarCall, _callback);
- return localVarCall;
- }
/**
* Build call for deleteUserExternalPrincipal
* @param userId (required)
@@ -1411,6 +1273,7 @@ public okhttp3.Call getExternalPrincipalAsync(String principalId, final ApiCallb
Status Code | Description | Response Headers |
200 | pull request | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
404 | Resource Not Found | - |
420 | too many requests | - |
@@ -1479,6 +1342,7 @@ private okhttp3.Call getPullRequestValidateBeforeCall(String repository, String
Status Code | Description | Response Headers |
200 | pull request | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
404 | Resource Not Found | - |
420 | too many requests | - |
@@ -1501,6 +1365,7 @@ public PullRequest getPullRequest(String repository, String pullRequest) throws
Status Code | Description | Response Headers |
200 | pull request | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
404 | Resource Not Found | - |
420 | too many requests | - |
@@ -1525,6 +1390,7 @@ public ApiResponse getPullRequestWithHttpInfo(String repository, St
Status Code | Description | Response Headers |
200 | pull request | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
404 | Resource Not Found | - |
420 | too many requests | - |
@@ -2147,7 +2013,8 @@ public okhttp3.Call stsLoginAsync(StsAuthRequest stsAuthRequest, final ApiCallba
* @http.response.details
Status Code | Description | Response Headers |
- 204 | pull request deleted successfully | - |
+ 200 | pull request updated successfully | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Resource Not Found | - |
@@ -2221,7 +2088,8 @@ private okhttp3.Call updatePullRequestValidateBeforeCall(String repository, Stri
* @http.response.details
Status Code | Description | Response Headers |
- 204 | pull request deleted successfully | - |
+ 200 | pull request updated successfully | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Resource Not Found | - |
@@ -2244,7 +2112,8 @@ public void updatePullRequest(String repository, String pullRequest, PullRequest
* @http.response.details
Status Code | Description | Response Headers |
- 204 | pull request deleted successfully | - |
+ 200 | pull request updated successfully | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Resource Not Found | - |
@@ -2269,7 +2138,8 @@ public ApiResponse updatePullRequestWithHttpInfo(String repository, String
* @http.response.details
Status Code | Description | Response Headers |
- 204 | pull request deleted successfully | - |
+ 200 | pull request updated successfully | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Resource Not Found | - |
diff --git a/clients/java-legacy/src/main/java/io/lakefs/clients/api/PullsApi.java b/clients/java-legacy/src/main/java/io/lakefs/clients/api/PullsApi.java
index a69fa23d1a3..55d5ae890eb 100644
--- a/clients/java-legacy/src/main/java/io/lakefs/clients/api/PullsApi.java
+++ b/clients/java-legacy/src/main/java/io/lakefs/clients/api/PullsApi.java
@@ -207,144 +207,6 @@ public okhttp3.Call createPullRequestAsync(String repository, PullRequestCreatio
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
- /**
- * Build call for deletePullRequest
- * @param repository (required)
- * @param pullRequest pull request id (required)
- * @param _callback Callback for upload/download progress
- * @return Call to execute
- * @throws ApiException If fail to serialize the request body object
- * @http.response.details
-
- Status Code | Description | Response Headers |
- 204 | pull request deleted successfully | - |
- 401 | Unauthorized | - |
- 403 | Forbidden | - |
- 404 | Resource Not Found | - |
- 420 | too many requests | - |
- 0 | Internal Server Error | - |
-
- */
- public okhttp3.Call deletePullRequestCall(String repository, String pullRequest, final ApiCallback _callback) throws ApiException {
- Object localVarPostBody = null;
-
- // create path and map variables
- String localVarPath = "/repositories/{repository}/pulls/{pull_request}"
- .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString()))
- .replaceAll("\\{" + "pull_request" + "\\}", localVarApiClient.escapeString(pullRequest.toString()));
-
- List localVarQueryParams = new ArrayList();
- List localVarCollectionQueryParams = new ArrayList();
- Map localVarHeaderParams = new HashMap();
- Map localVarCookieParams = new HashMap();
- Map localVarFormParams = new HashMap();
-
- final String[] localVarAccepts = {
- "application/json"
- };
- final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) {
- localVarHeaderParams.put("Accept", localVarAccept);
- }
-
- final String[] localVarContentTypes = {
-
- };
- final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
- localVarHeaderParams.put("Content-Type", localVarContentType);
-
- String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" };
- return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
- }
-
- @SuppressWarnings("rawtypes")
- private okhttp3.Call deletePullRequestValidateBeforeCall(String repository, String pullRequest, final ApiCallback _callback) throws ApiException {
-
- // verify the required parameter 'repository' is set
- if (repository == null) {
- throw new ApiException("Missing the required parameter 'repository' when calling deletePullRequest(Async)");
- }
-
- // verify the required parameter 'pullRequest' is set
- if (pullRequest == null) {
- throw new ApiException("Missing the required parameter 'pullRequest' when calling deletePullRequest(Async)");
- }
-
-
- okhttp3.Call localVarCall = deletePullRequestCall(repository, pullRequest, _callback);
- return localVarCall;
-
- }
-
- /**
- * delete pull request
- *
- * @param repository (required)
- * @param pullRequest pull request id (required)
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- * @http.response.details
-
- Status Code | Description | Response Headers |
- 204 | pull request deleted successfully | - |
- 401 | Unauthorized | - |
- 403 | Forbidden | - |
- 404 | Resource Not Found | - |
- 420 | too many requests | - |
- 0 | Internal Server Error | - |
-
- */
- public void deletePullRequest(String repository, String pullRequest) throws ApiException {
- deletePullRequestWithHttpInfo(repository, pullRequest);
- }
-
- /**
- * delete pull request
- *
- * @param repository (required)
- * @param pullRequest pull request id (required)
- * @return ApiResponse<Void>
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- * @http.response.details
-
- Status Code | Description | Response Headers |
- 204 | pull request deleted successfully | - |
- 401 | Unauthorized | - |
- 403 | Forbidden | - |
- 404 | Resource Not Found | - |
- 420 | too many requests | - |
- 0 | Internal Server Error | - |
-
- */
- public ApiResponse deletePullRequestWithHttpInfo(String repository, String pullRequest) throws ApiException {
- okhttp3.Call localVarCall = deletePullRequestValidateBeforeCall(repository, pullRequest, null);
- return localVarApiClient.execute(localVarCall);
- }
-
- /**
- * delete pull request (asynchronously)
- *
- * @param repository (required)
- * @param pullRequest pull request id (required)
- * @param _callback The callback to be executed when the API call finishes
- * @return The request call
- * @throws ApiException If fail to process the API call, e.g. serializing the request body object
- * @http.response.details
-
- Status Code | Description | Response Headers |
- 204 | pull request deleted successfully | - |
- 401 | Unauthorized | - |
- 403 | Forbidden | - |
- 404 | Resource Not Found | - |
- 420 | too many requests | - |
- 0 | Internal Server Error | - |
-
- */
- public okhttp3.Call deletePullRequestAsync(String repository, String pullRequest, final ApiCallback _callback) throws ApiException {
-
- okhttp3.Call localVarCall = deletePullRequestValidateBeforeCall(repository, pullRequest, _callback);
- localVarApiClient.executeAsync(localVarCall, _callback);
- return localVarCall;
- }
/**
* Build call for getPullRequest
* @param repository (required)
@@ -356,6 +218,7 @@ public okhttp3.Call deletePullRequestAsync(String repository, String pullRequest
Status Code | Description | Response Headers |
200 | pull request | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
404 | Resource Not Found | - |
420 | too many requests | - |
@@ -424,6 +287,7 @@ private okhttp3.Call getPullRequestValidateBeforeCall(String repository, String
Status Code | Description | Response Headers |
200 | pull request | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
404 | Resource Not Found | - |
420 | too many requests | - |
@@ -446,6 +310,7 @@ public PullRequest getPullRequest(String repository, String pullRequest) throws
Status Code | Description | Response Headers |
200 | pull request | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
404 | Resource Not Found | - |
420 | too many requests | - |
@@ -470,6 +335,7 @@ public ApiResponse getPullRequestWithHttpInfo(String repository, St
Status Code | Description | Response Headers |
200 | pull request | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
404 | Resource Not Found | - |
420 | too many requests | - |
@@ -654,7 +520,8 @@ public okhttp3.Call listPullRequestsAsync(String repository, String prefix, Stri
* @http.response.details
Status Code | Description | Response Headers |
- 204 | pull request deleted successfully | - |
+ 200 | pull request updated successfully | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Resource Not Found | - |
@@ -728,7 +595,8 @@ private okhttp3.Call updatePullRequestValidateBeforeCall(String repository, Stri
* @http.response.details
Status Code | Description | Response Headers |
- 204 | pull request deleted successfully | - |
+ 200 | pull request updated successfully | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Resource Not Found | - |
@@ -751,7 +619,8 @@ public void updatePullRequest(String repository, String pullRequest, PullRequest
* @http.response.details
Status Code | Description | Response Headers |
- 204 | pull request deleted successfully | - |
+ 200 | pull request updated successfully | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Resource Not Found | - |
@@ -776,7 +645,8 @@ public ApiResponse updatePullRequestWithHttpInfo(String repository, String
* @http.response.details
Status Code | Description | Response Headers |
- 204 | pull request deleted successfully | - |
+ 200 | pull request updated successfully | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Resource Not Found | - |
diff --git a/clients/java-legacy/src/test/java/io/lakefs/clients/api/ExperimentalApiTest.java b/clients/java-legacy/src/test/java/io/lakefs/clients/api/ExperimentalApiTest.java
index be50bce6f07..26b37f411de 100644
--- a/clients/java-legacy/src/test/java/io/lakefs/clients/api/ExperimentalApiTest.java
+++ b/clients/java-legacy/src/test/java/io/lakefs/clients/api/ExperimentalApiTest.java
@@ -136,22 +136,6 @@ public void createUserExternalPrincipalTest() throws ApiException {
// TODO: test validations
}
- /**
- * delete pull request
- *
- *
- *
- * @throws ApiException
- * if the Api call fails
- */
- @Test
- public void deletePullRequestTest() throws ApiException {
- String repository = null;
- String pullRequest = null;
- api.deletePullRequest(repository, pullRequest);
- // TODO: test validations
- }
-
/**
* delete external principal from user
*
diff --git a/clients/java-legacy/src/test/java/io/lakefs/clients/api/PullsApiTest.java b/clients/java-legacy/src/test/java/io/lakefs/clients/api/PullsApiTest.java
index 20816ffbc7d..4e093d5f62b 100644
--- a/clients/java-legacy/src/test/java/io/lakefs/clients/api/PullsApiTest.java
+++ b/clients/java-legacy/src/test/java/io/lakefs/clients/api/PullsApiTest.java
@@ -52,22 +52,6 @@ public void createPullRequestTest() throws ApiException {
// TODO: test validations
}
- /**
- * delete pull request
- *
- *
- *
- * @throws ApiException
- * if the Api call fails
- */
- @Test
- public void deletePullRequestTest() throws ApiException {
- String repository = null;
- String pullRequest = null;
- api.deletePullRequest(repository, pullRequest);
- // TODO: test validations
- }
-
/**
* get pull request
*
diff --git a/clients/java/README.md b/clients/java/README.md
index 61e0b576bc3..8a793887131 100644
--- a/clients/java/README.md
+++ b/clients/java/README.md
@@ -199,7 +199,6 @@ Class | Method | HTTP request | Description
*ExperimentalApi* | [**createPresignMultipartUpload**](docs/ExperimentalApi.md#createPresignMultipartUpload) | **POST** /repositories/{repository}/branches/{branch}/staging/pmpu | Initiate a multipart upload
*ExperimentalApi* | [**createPullRequest**](docs/ExperimentalApi.md#createPullRequest) | **POST** /repositories/{repository}/pulls | create pull request
*ExperimentalApi* | [**createUserExternalPrincipal**](docs/ExperimentalApi.md#createUserExternalPrincipal) | **POST** /auth/users/{userId}/external/principals | attach external principal to user
-*ExperimentalApi* | [**deletePullRequest**](docs/ExperimentalApi.md#deletePullRequest) | **DELETE** /repositories/{repository}/pulls/{pull_request} | delete pull request
*ExperimentalApi* | [**deleteUserExternalPrincipal**](docs/ExperimentalApi.md#deleteUserExternalPrincipal) | **DELETE** /auth/users/{userId}/external/principals | delete external principal from user
*ExperimentalApi* | [**externalPrincipalLogin**](docs/ExperimentalApi.md#externalPrincipalLogin) | **POST** /auth/external/principal/login | perform a login using an external authenticator
*ExperimentalApi* | [**getExternalPrincipal**](docs/ExperimentalApi.md#getExternalPrincipal) | **GET** /auth/external/principals | describe external principal by id
@@ -258,7 +257,6 @@ Class | Method | HTTP request | Description
*ObjectsApi* | [**statObject**](docs/ObjectsApi.md#statObject) | **GET** /repositories/{repository}/refs/{ref}/objects/stat | get object metadata
*ObjectsApi* | [**uploadObject**](docs/ObjectsApi.md#uploadObject) | **POST** /repositories/{repository}/branches/{branch}/objects |
*PullsApi* | [**createPullRequest**](docs/PullsApi.md#createPullRequest) | **POST** /repositories/{repository}/pulls | create pull request
-*PullsApi* | [**deletePullRequest**](docs/PullsApi.md#deletePullRequest) | **DELETE** /repositories/{repository}/pulls/{pull_request} | delete pull request
*PullsApi* | [**getPullRequest**](docs/PullsApi.md#getPullRequest) | **GET** /repositories/{repository}/pulls/{pull_request} | get pull request
*PullsApi* | [**listPullRequests**](docs/PullsApi.md#listPullRequests) | **GET** /repositories/{repository}/pulls | list pull requests
*PullsApi* | [**updatePullRequest**](docs/PullsApi.md#updatePullRequest) | **PATCH** /repositories/{repository}/pulls/{pull_request} | update pull request
diff --git a/clients/java/api/openapi.yaml b/clients/java/api/openapi.yaml
index 0b53e5b20db..667fe91ab8d 100644
--- a/clients/java/api/openapi.yaml
+++ b/clients/java/api/openapi.yaml
@@ -6898,58 +6898,6 @@ paths:
x-content-type: application/json
x-accepts: application/json
/repositories/{repository}/pulls/{pull_request}:
- delete:
- operationId: deletePullRequest
- parameters:
- - explode: false
- in: path
- name: repository
- required: true
- schema:
- type: string
- style: simple
- - description: pull request id
- explode: false
- in: path
- name: pull_request
- required: true
- schema:
- type: string
- style: simple
- responses:
- "204":
- description: pull request deleted successfully
- "401":
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- description: Unauthorized
- "403":
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- description: Forbidden
- "404":
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- description: Resource Not Found
- "420":
- description: too many requests
- default:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
- description: Internal Server Error
- summary: delete pull request
- tags:
- - pulls
- - experimental
- x-accepts: application/json
get:
operationId: getPullRequest
parameters:
@@ -6975,6 +6923,12 @@ paths:
schema:
$ref: '#/components/schemas/PullRequest'
description: pull request
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Validation Error
"401":
content:
application/json:
@@ -7025,8 +6979,14 @@ paths:
$ref: '#/components/schemas/PullRequestBasic'
required: true
responses:
- "204":
- description: pull request deleted successfully
+ "200":
+ description: pull request updated successfully
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Error'
+ description: Validation Error
"401":
content:
application/json:
diff --git a/clients/java/docs/ExperimentalApi.md b/clients/java/docs/ExperimentalApi.md
index b2ae55491d3..ef9a59b1a1d 100644
--- a/clients/java/docs/ExperimentalApi.md
+++ b/clients/java/docs/ExperimentalApi.md
@@ -9,7 +9,6 @@ All URIs are relative to */api/v1*
| [**createPresignMultipartUpload**](ExperimentalApi.md#createPresignMultipartUpload) | **POST** /repositories/{repository}/branches/{branch}/staging/pmpu | Initiate a multipart upload |
| [**createPullRequest**](ExperimentalApi.md#createPullRequest) | **POST** /repositories/{repository}/pulls | create pull request |
| [**createUserExternalPrincipal**](ExperimentalApi.md#createUserExternalPrincipal) | **POST** /auth/users/{userId}/external/principals | attach external principal to user |
-| [**deletePullRequest**](ExperimentalApi.md#deletePullRequest) | **DELETE** /repositories/{repository}/pulls/{pull_request} | delete pull request |
| [**deleteUserExternalPrincipal**](ExperimentalApi.md#deleteUserExternalPrincipal) | **DELETE** /auth/users/{userId}/external/principals | delete external principal from user |
| [**externalPrincipalLogin**](ExperimentalApi.md#externalPrincipalLogin) | **POST** /auth/external/principal/login | perform a login using an external authenticator |
| [**getExternalPrincipal**](ExperimentalApi.md#getExternalPrincipal) | **GET** /auth/external/principals | describe external principal by id |
@@ -530,101 +529,6 @@ null (empty response body)
| **420** | too many requests | - |
| **0** | Internal Server Error | - |
-
-# **deletePullRequest**
-> deletePullRequest(repository, pullRequest).execute();
-
-delete pull request
-
-### Example
-```java
-// Import classes:
-import io.lakefs.clients.sdk.ApiClient;
-import io.lakefs.clients.sdk.ApiException;
-import io.lakefs.clients.sdk.Configuration;
-import io.lakefs.clients.sdk.auth.*;
-import io.lakefs.clients.sdk.models.*;
-import io.lakefs.clients.sdk.ExperimentalApi;
-
-public class Example {
- public static void main(String[] args) {
- ApiClient defaultClient = Configuration.getDefaultApiClient();
- defaultClient.setBasePath("/api/v1");
-
- // Configure HTTP basic authorization: basic_auth
- HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth");
- basic_auth.setUsername("YOUR USERNAME");
- basic_auth.setPassword("YOUR PASSWORD");
-
- // Configure API key authorization: cookie_auth
- ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth");
- cookie_auth.setApiKey("YOUR API KEY");
- // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
- //cookie_auth.setApiKeyPrefix("Token");
-
- // Configure API key authorization: oidc_auth
- ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth");
- oidc_auth.setApiKey("YOUR API KEY");
- // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
- //oidc_auth.setApiKeyPrefix("Token");
-
- // Configure API key authorization: saml_auth
- ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth");
- saml_auth.setApiKey("YOUR API KEY");
- // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
- //saml_auth.setApiKeyPrefix("Token");
-
- // Configure HTTP bearer authorization: jwt_token
- HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token");
- jwt_token.setBearerToken("BEARER TOKEN");
-
- ExperimentalApi apiInstance = new ExperimentalApi(defaultClient);
- String repository = "repository_example"; // String |
- String pullRequest = "pullRequest_example"; // String | pull request id
- try {
- apiInstance.deletePullRequest(repository, pullRequest)
- .execute();
- } catch (ApiException e) {
- System.err.println("Exception when calling ExperimentalApi#deletePullRequest");
- System.err.println("Status code: " + e.getCode());
- System.err.println("Reason: " + e.getResponseBody());
- System.err.println("Response headers: " + e.getResponseHeaders());
- e.printStackTrace();
- }
- }
-}
-```
-
-### Parameters
-
-| Name | Type | Description | Notes |
-|------------- | ------------- | ------------- | -------------|
-| **repository** | **String**| | |
-| **pullRequest** | **String**| pull request id | |
-
-### Return type
-
-null (empty response body)
-
-### Authorization
-
-[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token)
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/json
-
-### HTTP response details
-| Status code | Description | Response headers |
-|-------------|-------------|------------------|
-| **204** | pull request deleted successfully | - |
-| **401** | Unauthorized | - |
-| **403** | Forbidden | - |
-| **404** | Resource Not Found | - |
-| **420** | too many requests | - |
-| **0** | Internal Server Error | - |
-
# **deleteUserExternalPrincipal**
> deleteUserExternalPrincipal(userId, principalId).execute();
@@ -970,6 +874,7 @@ public class Example {
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | pull request | - |
+| **400** | Validation Error | - |
| **401** | Unauthorized | - |
| **404** | Resource Not Found | - |
| **420** | too many requests | - |
@@ -1439,7 +1344,8 @@ null (empty response body)
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-| **204** | pull request deleted successfully | - |
+| **200** | pull request updated successfully | - |
+| **400** | Validation Error | - |
| **401** | Unauthorized | - |
| **403** | Forbidden | - |
| **404** | Resource Not Found | - |
diff --git a/clients/java/docs/PullsApi.md b/clients/java/docs/PullsApi.md
index 11249f2f27a..1ba6bc1b223 100644
--- a/clients/java/docs/PullsApi.md
+++ b/clients/java/docs/PullsApi.md
@@ -5,7 +5,6 @@ All URIs are relative to */api/v1*
| Method | HTTP request | Description |
|------------- | ------------- | -------------|
| [**createPullRequest**](PullsApi.md#createPullRequest) | **POST** /repositories/{repository}/pulls | create pull request |
-| [**deletePullRequest**](PullsApi.md#deletePullRequest) | **DELETE** /repositories/{repository}/pulls/{pull_request} | delete pull request |
| [**getPullRequest**](PullsApi.md#getPullRequest) | **GET** /repositories/{repository}/pulls/{pull_request} | get pull request |
| [**listPullRequests**](PullsApi.md#listPullRequests) | **GET** /repositories/{repository}/pulls | list pull requests |
| [**updatePullRequest**](PullsApi.md#updatePullRequest) | **PATCH** /repositories/{repository}/pulls/{pull_request} | update pull request |
@@ -109,101 +108,6 @@ public class Example {
| **420** | too many requests | - |
| **0** | Internal Server Error | - |
-
-# **deletePullRequest**
-> deletePullRequest(repository, pullRequest).execute();
-
-delete pull request
-
-### Example
-```java
-// Import classes:
-import io.lakefs.clients.sdk.ApiClient;
-import io.lakefs.clients.sdk.ApiException;
-import io.lakefs.clients.sdk.Configuration;
-import io.lakefs.clients.sdk.auth.*;
-import io.lakefs.clients.sdk.models.*;
-import io.lakefs.clients.sdk.PullsApi;
-
-public class Example {
- public static void main(String[] args) {
- ApiClient defaultClient = Configuration.getDefaultApiClient();
- defaultClient.setBasePath("/api/v1");
-
- // Configure HTTP basic authorization: basic_auth
- HttpBasicAuth basic_auth = (HttpBasicAuth) defaultClient.getAuthentication("basic_auth");
- basic_auth.setUsername("YOUR USERNAME");
- basic_auth.setPassword("YOUR PASSWORD");
-
- // Configure API key authorization: cookie_auth
- ApiKeyAuth cookie_auth = (ApiKeyAuth) defaultClient.getAuthentication("cookie_auth");
- cookie_auth.setApiKey("YOUR API KEY");
- // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
- //cookie_auth.setApiKeyPrefix("Token");
-
- // Configure API key authorization: oidc_auth
- ApiKeyAuth oidc_auth = (ApiKeyAuth) defaultClient.getAuthentication("oidc_auth");
- oidc_auth.setApiKey("YOUR API KEY");
- // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
- //oidc_auth.setApiKeyPrefix("Token");
-
- // Configure API key authorization: saml_auth
- ApiKeyAuth saml_auth = (ApiKeyAuth) defaultClient.getAuthentication("saml_auth");
- saml_auth.setApiKey("YOUR API KEY");
- // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
- //saml_auth.setApiKeyPrefix("Token");
-
- // Configure HTTP bearer authorization: jwt_token
- HttpBearerAuth jwt_token = (HttpBearerAuth) defaultClient.getAuthentication("jwt_token");
- jwt_token.setBearerToken("BEARER TOKEN");
-
- PullsApi apiInstance = new PullsApi(defaultClient);
- String repository = "repository_example"; // String |
- String pullRequest = "pullRequest_example"; // String | pull request id
- try {
- apiInstance.deletePullRequest(repository, pullRequest)
- .execute();
- } catch (ApiException e) {
- System.err.println("Exception when calling PullsApi#deletePullRequest");
- System.err.println("Status code: " + e.getCode());
- System.err.println("Reason: " + e.getResponseBody());
- System.err.println("Response headers: " + e.getResponseHeaders());
- e.printStackTrace();
- }
- }
-}
-```
-
-### Parameters
-
-| Name | Type | Description | Notes |
-|------------- | ------------- | ------------- | -------------|
-| **repository** | **String**| | |
-| **pullRequest** | **String**| pull request id | |
-
-### Return type
-
-null (empty response body)
-
-### Authorization
-
-[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token)
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/json
-
-### HTTP response details
-| Status code | Description | Response headers |
-|-------------|-------------|------------------|
-| **204** | pull request deleted successfully | - |
-| **401** | Unauthorized | - |
-| **403** | Forbidden | - |
-| **404** | Resource Not Found | - |
-| **420** | too many requests | - |
-| **0** | Internal Server Error | - |
-
# **getPullRequest**
> PullRequest getPullRequest(repository, pullRequest).execute();
@@ -294,6 +198,7 @@ public class Example {
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | pull request | - |
+| **400** | Validation Error | - |
| **401** | Unauthorized | - |
| **404** | Resource Not Found | - |
| **420** | too many requests | - |
@@ -494,7 +399,8 @@ null (empty response body)
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-| **204** | pull request deleted successfully | - |
+| **200** | pull request updated successfully | - |
+| **400** | Validation Error | - |
| **401** | Unauthorized | - |
| **403** | Forbidden | - |
| **404** | Resource Not Found | - |
diff --git a/clients/java/src/main/java/io/lakefs/clients/sdk/ExperimentalApi.java b/clients/java/src/main/java/io/lakefs/clients/sdk/ExperimentalApi.java
index dfa4a21b551..2fdac4d5f33 100644
--- a/clients/java/src/main/java/io/lakefs/clients/sdk/ExperimentalApi.java
+++ b/clients/java/src/main/java/io/lakefs/clients/sdk/ExperimentalApi.java
@@ -1133,188 +1133,6 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiEx
public APIcreateUserExternalPrincipalRequest createUserExternalPrincipal(String userId, String principalId) {
return new APIcreateUserExternalPrincipalRequest(userId, principalId);
}
- private okhttp3.Call deletePullRequestCall(String repository, String pullRequest, final ApiCallback _callback) throws ApiException {
- String basePath = null;
- // Operation Servers
- String[] localBasePaths = new String[] { };
-
- // Determine Base Path to Use
- if (localCustomBaseUrl != null){
- basePath = localCustomBaseUrl;
- } else if ( localBasePaths.length > 0 ) {
- basePath = localBasePaths[localHostIndex];
- } else {
- basePath = null;
- }
-
- Object localVarPostBody = null;
-
- // create path and map variables
- String localVarPath = "/repositories/{repository}/pulls/{pull_request}"
- .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString()))
- .replace("{" + "pull_request" + "}", localVarApiClient.escapeString(pullRequest.toString()));
-
- List localVarQueryParams = new ArrayList();
- List localVarCollectionQueryParams = new ArrayList();
- Map localVarHeaderParams = new HashMap();
- Map localVarCookieParams = new HashMap();
- Map localVarFormParams = new HashMap();
-
- final String[] localVarAccepts = {
- "application/json"
- };
- final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) {
- localVarHeaderParams.put("Accept", localVarAccept);
- }
-
- final String[] localVarContentTypes = {
- };
- final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
- if (localVarContentType != null) {
- localVarHeaderParams.put("Content-Type", localVarContentType);
- }
-
- String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" };
- return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
- }
-
- @SuppressWarnings("rawtypes")
- private okhttp3.Call deletePullRequestValidateBeforeCall(String repository, String pullRequest, final ApiCallback _callback) throws ApiException {
- // verify the required parameter 'repository' is set
- if (repository == null) {
- throw new ApiException("Missing the required parameter 'repository' when calling deletePullRequest(Async)");
- }
-
- // verify the required parameter 'pullRequest' is set
- if (pullRequest == null) {
- throw new ApiException("Missing the required parameter 'pullRequest' when calling deletePullRequest(Async)");
- }
-
- return deletePullRequestCall(repository, pullRequest, _callback);
-
- }
-
-
- private ApiResponse deletePullRequestWithHttpInfo(String repository, String pullRequest) throws ApiException {
- okhttp3.Call localVarCall = deletePullRequestValidateBeforeCall(repository, pullRequest, null);
- return localVarApiClient.execute(localVarCall);
- }
-
- private okhttp3.Call deletePullRequestAsync(String repository, String pullRequest, final ApiCallback _callback) throws ApiException {
-
- okhttp3.Call localVarCall = deletePullRequestValidateBeforeCall(repository, pullRequest, _callback);
- localVarApiClient.executeAsync(localVarCall, _callback);
- return localVarCall;
- }
-
- public class APIdeletePullRequestRequest {
- private final String repository;
- private final String pullRequest;
-
- private APIdeletePullRequestRequest(String repository, String pullRequest) {
- this.repository = repository;
- this.pullRequest = pullRequest;
- }
-
- /**
- * Build call for deletePullRequest
- * @param _callback ApiCallback API callback
- * @return Call to execute
- * @throws ApiException If fail to serialize the request body object
- * @http.response.details
-
- Status Code | Description | Response Headers |
- 204 | pull request deleted successfully | - |
- 401 | Unauthorized | - |
- 403 | Forbidden | - |
- 404 | Resource Not Found | - |
- 420 | too many requests | - |
- 0 | Internal Server Error | - |
-
- */
- public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
- return deletePullRequestCall(repository, pullRequest, _callback);
- }
-
- /**
- * Execute deletePullRequest request
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- * @http.response.details
-
- Status Code | Description | Response Headers |
- 204 | pull request deleted successfully | - |
- 401 | Unauthorized | - |
- 403 | Forbidden | - |
- 404 | Resource Not Found | - |
- 420 | too many requests | - |
- 0 | Internal Server Error | - |
-
- */
- public void execute() throws ApiException {
- deletePullRequestWithHttpInfo(repository, pullRequest);
- }
-
- /**
- * Execute deletePullRequest request with HTTP info returned
- * @return ApiResponse<Void>
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- * @http.response.details
-
- Status Code | Description | Response Headers |
- 204 | pull request deleted successfully | - |
- 401 | Unauthorized | - |
- 403 | Forbidden | - |
- 404 | Resource Not Found | - |
- 420 | too many requests | - |
- 0 | Internal Server Error | - |
-
- */
- public ApiResponse executeWithHttpInfo() throws ApiException {
- return deletePullRequestWithHttpInfo(repository, pullRequest);
- }
-
- /**
- * Execute deletePullRequest request (asynchronously)
- * @param _callback The callback to be executed when the API call finishes
- * @return The request call
- * @throws ApiException If fail to process the API call, e.g. serializing the request body object
- * @http.response.details
-
- Status Code | Description | Response Headers |
- 204 | pull request deleted successfully | - |
- 401 | Unauthorized | - |
- 403 | Forbidden | - |
- 404 | Resource Not Found | - |
- 420 | too many requests | - |
- 0 | Internal Server Error | - |
-
- */
- public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
- return deletePullRequestAsync(repository, pullRequest, _callback);
- }
- }
-
- /**
- * delete pull request
- *
- * @param repository (required)
- * @param pullRequest pull request id (required)
- * @return APIdeletePullRequestRequest
- * @http.response.details
-
- Status Code | Description | Response Headers |
- 204 | pull request deleted successfully | - |
- 401 | Unauthorized | - |
- 403 | Forbidden | - |
- 404 | Resource Not Found | - |
- 420 | too many requests | - |
- 0 | Internal Server Error | - |
-
- */
- public APIdeletePullRequestRequest deletePullRequest(String repository, String pullRequest) {
- return new APIdeletePullRequestRequest(repository, pullRequest);
- }
private okhttp3.Call deleteUserExternalPrincipalCall(String userId, String principalId, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
@@ -1950,6 +1768,7 @@ private APIgetPullRequestRequest(String repository, String pullRequest) {
Status Code | Description | Response Headers |
200 | pull request | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
404 | Resource Not Found | - |
420 | too many requests | - |
@@ -1968,6 +1787,7 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
Status Code | Description | Response Headers |
200 | pull request | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
404 | Resource Not Found | - |
420 | too many requests | - |
@@ -1987,6 +1807,7 @@ public PullRequest execute() throws ApiException {
Status Code | Description | Response Headers |
200 | pull request | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
404 | Resource Not Found | - |
420 | too many requests | - |
@@ -2006,6 +1827,7 @@ public ApiResponse executeWithHttpInfo() throws ApiException {
Status Code | Description | Response Headers |
200 | pull request | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
404 | Resource Not Found | - |
420 | too many requests | - |
@@ -2027,6 +1849,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throw
Status Code | Description | Response Headers |
200 | pull request | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
404 | Resource Not Found | - |
420 | too many requests | - |
@@ -2966,7 +2789,8 @@ private APIupdatePullRequestRequest(String repository, String pullRequest, PullR
* @http.response.details
Status Code | Description | Response Headers |
- 204 | pull request deleted successfully | - |
+ 200 | pull request updated successfully | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Resource Not Found | - |
@@ -2984,7 +2808,8 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
* @http.response.details
Status Code | Description | Response Headers |
- 204 | pull request deleted successfully | - |
+ 200 | pull request updated successfully | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Resource Not Found | - |
@@ -3003,7 +2828,8 @@ public void execute() throws ApiException {
* @http.response.details
Status Code | Description | Response Headers |
- 204 | pull request deleted successfully | - |
+ 200 | pull request updated successfully | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Resource Not Found | - |
@@ -3023,7 +2849,8 @@ public ApiResponse executeWithHttpInfo() throws ApiException {
* @http.response.details
Status Code | Description | Response Headers |
- 204 | pull request deleted successfully | - |
+ 200 | pull request updated successfully | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Resource Not Found | - |
@@ -3046,7 +2873,8 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiEx
* @http.response.details
Status Code | Description | Response Headers |
- 204 | pull request deleted successfully | - |
+ 200 | pull request updated successfully | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Resource Not Found | - |
diff --git a/clients/java/src/main/java/io/lakefs/clients/sdk/PullsApi.java b/clients/java/src/main/java/io/lakefs/clients/sdk/PullsApi.java
index 9d62f7448ab..38803cf6c1a 100644
--- a/clients/java/src/main/java/io/lakefs/clients/sdk/PullsApi.java
+++ b/clients/java/src/main/java/io/lakefs/clients/sdk/PullsApi.java
@@ -273,188 +273,6 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws Api
public APIcreatePullRequestRequest createPullRequest(String repository, PullRequestCreation pullRequestCreation) {
return new APIcreatePullRequestRequest(repository, pullRequestCreation);
}
- private okhttp3.Call deletePullRequestCall(String repository, String pullRequest, final ApiCallback _callback) throws ApiException {
- String basePath = null;
- // Operation Servers
- String[] localBasePaths = new String[] { };
-
- // Determine Base Path to Use
- if (localCustomBaseUrl != null){
- basePath = localCustomBaseUrl;
- } else if ( localBasePaths.length > 0 ) {
- basePath = localBasePaths[localHostIndex];
- } else {
- basePath = null;
- }
-
- Object localVarPostBody = null;
-
- // create path and map variables
- String localVarPath = "/repositories/{repository}/pulls/{pull_request}"
- .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString()))
- .replace("{" + "pull_request" + "}", localVarApiClient.escapeString(pullRequest.toString()));
-
- List localVarQueryParams = new ArrayList();
- List localVarCollectionQueryParams = new ArrayList();
- Map localVarHeaderParams = new HashMap();
- Map localVarCookieParams = new HashMap();
- Map localVarFormParams = new HashMap();
-
- final String[] localVarAccepts = {
- "application/json"
- };
- final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) {
- localVarHeaderParams.put("Accept", localVarAccept);
- }
-
- final String[] localVarContentTypes = {
- };
- final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
- if (localVarContentType != null) {
- localVarHeaderParams.put("Content-Type", localVarContentType);
- }
-
- String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" };
- return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
- }
-
- @SuppressWarnings("rawtypes")
- private okhttp3.Call deletePullRequestValidateBeforeCall(String repository, String pullRequest, final ApiCallback _callback) throws ApiException {
- // verify the required parameter 'repository' is set
- if (repository == null) {
- throw new ApiException("Missing the required parameter 'repository' when calling deletePullRequest(Async)");
- }
-
- // verify the required parameter 'pullRequest' is set
- if (pullRequest == null) {
- throw new ApiException("Missing the required parameter 'pullRequest' when calling deletePullRequest(Async)");
- }
-
- return deletePullRequestCall(repository, pullRequest, _callback);
-
- }
-
-
- private ApiResponse deletePullRequestWithHttpInfo(String repository, String pullRequest) throws ApiException {
- okhttp3.Call localVarCall = deletePullRequestValidateBeforeCall(repository, pullRequest, null);
- return localVarApiClient.execute(localVarCall);
- }
-
- private okhttp3.Call deletePullRequestAsync(String repository, String pullRequest, final ApiCallback _callback) throws ApiException {
-
- okhttp3.Call localVarCall = deletePullRequestValidateBeforeCall(repository, pullRequest, _callback);
- localVarApiClient.executeAsync(localVarCall, _callback);
- return localVarCall;
- }
-
- public class APIdeletePullRequestRequest {
- private final String repository;
- private final String pullRequest;
-
- private APIdeletePullRequestRequest(String repository, String pullRequest) {
- this.repository = repository;
- this.pullRequest = pullRequest;
- }
-
- /**
- * Build call for deletePullRequest
- * @param _callback ApiCallback API callback
- * @return Call to execute
- * @throws ApiException If fail to serialize the request body object
- * @http.response.details
-
- Status Code | Description | Response Headers |
- 204 | pull request deleted successfully | - |
- 401 | Unauthorized | - |
- 403 | Forbidden | - |
- 404 | Resource Not Found | - |
- 420 | too many requests | - |
- 0 | Internal Server Error | - |
-
- */
- public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
- return deletePullRequestCall(repository, pullRequest, _callback);
- }
-
- /**
- * Execute deletePullRequest request
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- * @http.response.details
-
- Status Code | Description | Response Headers |
- 204 | pull request deleted successfully | - |
- 401 | Unauthorized | - |
- 403 | Forbidden | - |
- 404 | Resource Not Found | - |
- 420 | too many requests | - |
- 0 | Internal Server Error | - |
-
- */
- public void execute() throws ApiException {
- deletePullRequestWithHttpInfo(repository, pullRequest);
- }
-
- /**
- * Execute deletePullRequest request with HTTP info returned
- * @return ApiResponse<Void>
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- * @http.response.details
-
- Status Code | Description | Response Headers |
- 204 | pull request deleted successfully | - |
- 401 | Unauthorized | - |
- 403 | Forbidden | - |
- 404 | Resource Not Found | - |
- 420 | too many requests | - |
- 0 | Internal Server Error | - |
-
- */
- public ApiResponse executeWithHttpInfo() throws ApiException {
- return deletePullRequestWithHttpInfo(repository, pullRequest);
- }
-
- /**
- * Execute deletePullRequest request (asynchronously)
- * @param _callback The callback to be executed when the API call finishes
- * @return The request call
- * @throws ApiException If fail to process the API call, e.g. serializing the request body object
- * @http.response.details
-
- Status Code | Description | Response Headers |
- 204 | pull request deleted successfully | - |
- 401 | Unauthorized | - |
- 403 | Forbidden | - |
- 404 | Resource Not Found | - |
- 420 | too many requests | - |
- 0 | Internal Server Error | - |
-
- */
- public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
- return deletePullRequestAsync(repository, pullRequest, _callback);
- }
- }
-
- /**
- * delete pull request
- *
- * @param repository (required)
- * @param pullRequest pull request id (required)
- * @return APIdeletePullRequestRequest
- * @http.response.details
-
- Status Code | Description | Response Headers |
- 204 | pull request deleted successfully | - |
- 401 | Unauthorized | - |
- 403 | Forbidden | - |
- 404 | Resource Not Found | - |
- 420 | too many requests | - |
- 0 | Internal Server Error | - |
-
- */
- public APIdeletePullRequestRequest deletePullRequest(String repository, String pullRequest) {
- return new APIdeletePullRequestRequest(repository, pullRequest);
- }
private okhttp3.Call getPullRequestCall(String repository, String pullRequest, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
@@ -550,6 +368,7 @@ private APIgetPullRequestRequest(String repository, String pullRequest) {
Status Code | Description | Response Headers |
200 | pull request | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
404 | Resource Not Found | - |
420 | too many requests | - |
@@ -568,6 +387,7 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
Status Code | Description | Response Headers |
200 | pull request | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
404 | Resource Not Found | - |
420 | too many requests | - |
@@ -587,6 +407,7 @@ public PullRequest execute() throws ApiException {
Status Code | Description | Response Headers |
200 | pull request | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
404 | Resource Not Found | - |
420 | too many requests | - |
@@ -606,6 +427,7 @@ public ApiResponse executeWithHttpInfo() throws ApiException {
Status Code | Description | Response Headers |
200 | pull request | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
404 | Resource Not Found | - |
420 | too many requests | - |
@@ -627,6 +449,7 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throw
Status Code | Description | Response Headers |
200 | pull request | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
404 | Resource Not Found | - |
420 | too many requests | - |
@@ -968,7 +791,8 @@ private APIupdatePullRequestRequest(String repository, String pullRequest, PullR
* @http.response.details
Status Code | Description | Response Headers |
- 204 | pull request deleted successfully | - |
+ 200 | pull request updated successfully | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Resource Not Found | - |
@@ -986,7 +810,8 @@ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
* @http.response.details
Status Code | Description | Response Headers |
- 204 | pull request deleted successfully | - |
+ 200 | pull request updated successfully | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Resource Not Found | - |
@@ -1005,7 +830,8 @@ public void execute() throws ApiException {
* @http.response.details
Status Code | Description | Response Headers |
- 204 | pull request deleted successfully | - |
+ 200 | pull request updated successfully | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Resource Not Found | - |
@@ -1025,7 +851,8 @@ public ApiResponse executeWithHttpInfo() throws ApiException {
* @http.response.details
Status Code | Description | Response Headers |
- 204 | pull request deleted successfully | - |
+ 200 | pull request updated successfully | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Resource Not Found | - |
@@ -1048,7 +875,8 @@ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiEx
* @http.response.details
Status Code | Description | Response Headers |
- 204 | pull request deleted successfully | - |
+ 200 | pull request updated successfully | - |
+ 400 | Validation Error | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Resource Not Found | - |
diff --git a/clients/java/src/test/java/io/lakefs/clients/sdk/ExperimentalApiTest.java b/clients/java/src/test/java/io/lakefs/clients/sdk/ExperimentalApiTest.java
index dff4e0e38f1..ec3692e01fa 100644
--- a/clients/java/src/test/java/io/lakefs/clients/sdk/ExperimentalApiTest.java
+++ b/clients/java/src/test/java/io/lakefs/clients/sdk/ExperimentalApiTest.java
@@ -135,20 +135,6 @@ public void createUserExternalPrincipalTest() throws ApiException {
// TODO: test validations
}
- /**
- * delete pull request
- *
- * @throws ApiException if the Api call fails
- */
- @Test
- public void deletePullRequestTest() throws ApiException {
- String repository = null;
- String pullRequest = null;
- api.deletePullRequest(repository, pullRequest)
- .execute();
- // TODO: test validations
- }
-
/**
* delete external principal from user
*
diff --git a/clients/java/src/test/java/io/lakefs/clients/sdk/PullsApiTest.java b/clients/java/src/test/java/io/lakefs/clients/sdk/PullsApiTest.java
index 2d0e0ee9d1c..f591a797557 100644
--- a/clients/java/src/test/java/io/lakefs/clients/sdk/PullsApiTest.java
+++ b/clients/java/src/test/java/io/lakefs/clients/sdk/PullsApiTest.java
@@ -49,20 +49,6 @@ public void createPullRequestTest() throws ApiException {
// TODO: test validations
}
- /**
- * delete pull request
- *
- * @throws ApiException if the Api call fails
- */
- @Test
- public void deletePullRequestTest() throws ApiException {
- String repository = null;
- String pullRequest = null;
- api.deletePullRequest(repository, pullRequest)
- .execute();
- // TODO: test validations
- }
-
/**
* get pull request
*
diff --git a/clients/python-legacy/README.md b/clients/python-legacy/README.md
index d827b40812c..92211148338 100644
--- a/clients/python-legacy/README.md
+++ b/clients/python-legacy/README.md
@@ -172,7 +172,6 @@ Class | Method | HTTP request | Description
*ExperimentalApi* | [**create_presign_multipart_upload**](docs/ExperimentalApi.md#create_presign_multipart_upload) | **POST** /repositories/{repository}/branches/{branch}/staging/pmpu | Initiate a multipart upload
*ExperimentalApi* | [**create_pull_request**](docs/ExperimentalApi.md#create_pull_request) | **POST** /repositories/{repository}/pulls | create pull request
*ExperimentalApi* | [**create_user_external_principal**](docs/ExperimentalApi.md#create_user_external_principal) | **POST** /auth/users/{userId}/external/principals | attach external principal to user
-*ExperimentalApi* | [**delete_pull_request**](docs/ExperimentalApi.md#delete_pull_request) | **DELETE** /repositories/{repository}/pulls/{pull_request} | delete pull request
*ExperimentalApi* | [**delete_user_external_principal**](docs/ExperimentalApi.md#delete_user_external_principal) | **DELETE** /auth/users/{userId}/external/principals | delete external principal from user
*ExperimentalApi* | [**external_principal_login**](docs/ExperimentalApi.md#external_principal_login) | **POST** /auth/external/principal/login | perform a login using an external authenticator
*ExperimentalApi* | [**get_external_principal**](docs/ExperimentalApi.md#get_external_principal) | **GET** /auth/external/principals | describe external principal by id
@@ -231,7 +230,6 @@ Class | Method | HTTP request | Description
*ObjectsApi* | [**stat_object**](docs/ObjectsApi.md#stat_object) | **GET** /repositories/{repository}/refs/{ref}/objects/stat | get object metadata
*ObjectsApi* | [**upload_object**](docs/ObjectsApi.md#upload_object) | **POST** /repositories/{repository}/branches/{branch}/objects |
*PullsApi* | [**create_pull_request**](docs/PullsApi.md#create_pull_request) | **POST** /repositories/{repository}/pulls | create pull request
-*PullsApi* | [**delete_pull_request**](docs/PullsApi.md#delete_pull_request) | **DELETE** /repositories/{repository}/pulls/{pull_request} | delete pull request
*PullsApi* | [**get_pull_request**](docs/PullsApi.md#get_pull_request) | **GET** /repositories/{repository}/pulls/{pull_request} | get pull request
*PullsApi* | [**list_pull_requests**](docs/PullsApi.md#list_pull_requests) | **GET** /repositories/{repository}/pulls | list pull requests
*PullsApi* | [**update_pull_request**](docs/PullsApi.md#update_pull_request) | **PATCH** /repositories/{repository}/pulls/{pull_request} | update pull request
diff --git a/clients/python-legacy/docs/ExperimentalApi.md b/clients/python-legacy/docs/ExperimentalApi.md
index ab66f06adae..fc9acb4e6c0 100644
--- a/clients/python-legacy/docs/ExperimentalApi.md
+++ b/clients/python-legacy/docs/ExperimentalApi.md
@@ -9,7 +9,6 @@ Method | HTTP request | Description
[**create_presign_multipart_upload**](ExperimentalApi.md#create_presign_multipart_upload) | **POST** /repositories/{repository}/branches/{branch}/staging/pmpu | Initiate a multipart upload
[**create_pull_request**](ExperimentalApi.md#create_pull_request) | **POST** /repositories/{repository}/pulls | create pull request
[**create_user_external_principal**](ExperimentalApi.md#create_user_external_principal) | **POST** /auth/users/{userId}/external/principals | attach external principal to user
-[**delete_pull_request**](ExperimentalApi.md#delete_pull_request) | **DELETE** /repositories/{repository}/pulls/{pull_request} | delete pull request
[**delete_user_external_principal**](ExperimentalApi.md#delete_user_external_principal) | **DELETE** /auth/users/{userId}/external/principals | delete external principal from user
[**external_principal_login**](ExperimentalApi.md#external_principal_login) | **POST** /auth/external/principal/login | perform a login using an external authenticator
[**get_external_principal**](ExperimentalApi.md#get_external_principal) | **GET** /auth/external/principals | describe external principal by id
@@ -662,115 +661,6 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-# **delete_pull_request**
-> delete_pull_request(repository, pull_request)
-
-delete pull request
-
-### Example
-
-* Basic Authentication (basic_auth):
-* Api Key Authentication (cookie_auth):
-* Bearer (JWT) Authentication (jwt_token):
-* Api Key Authentication (oidc_auth):
-* Api Key Authentication (saml_auth):
-
-```python
-import time
-import lakefs_client
-from lakefs_client.api import experimental_api
-from lakefs_client.model.error import Error
-from pprint import pprint
-# Defining the host is optional and defaults to http://localhost/api/v1
-# See configuration.py for a list of all supported configuration parameters.
-configuration = lakefs_client.Configuration(
- host = "http://localhost/api/v1"
-)
-
-# The client must configure the authentication and authorization parameters
-# in accordance with the API server security policy.
-# Examples for each auth method are provided below, use the example that
-# satisfies your auth use case.
-
-# Configure HTTP basic authorization: basic_auth
-configuration = lakefs_client.Configuration(
- username = 'YOUR_USERNAME',
- password = 'YOUR_PASSWORD'
-)
-
-# Configure API key authorization: cookie_auth
-configuration.api_key['cookie_auth'] = 'YOUR_API_KEY'
-
-# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['cookie_auth'] = 'Bearer'
-
-# Configure Bearer authorization (JWT): jwt_token
-configuration = lakefs_client.Configuration(
- access_token = 'YOUR_BEARER_TOKEN'
-)
-
-# Configure API key authorization: oidc_auth
-configuration.api_key['oidc_auth'] = 'YOUR_API_KEY'
-
-# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['oidc_auth'] = 'Bearer'
-
-# Configure API key authorization: saml_auth
-configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
-
-# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['saml_auth'] = 'Bearer'
-
-# Enter a context with an instance of the API client
-with lakefs_client.ApiClient(configuration) as api_client:
- # Create an instance of the API class
- api_instance = experimental_api.ExperimentalApi(api_client)
- repository = "repository_example" # str |
- pull_request = "pull_request_example" # str | pull request id
-
- # example passing only required values which don't have defaults set
- try:
- # delete pull request
- api_instance.delete_pull_request(repository, pull_request)
- except lakefs_client.ApiException as e:
- print("Exception when calling ExperimentalApi->delete_pull_request: %s\n" % e)
-```
-
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **repository** | **str**| |
- **pull_request** | **str**| pull request id |
-
-### Return type
-
-void (empty response body)
-
-### Authorization
-
-[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth)
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/json
-
-
-### HTTP response details
-
-| Status code | Description | Response headers |
-|-------------|-------------|------------------|
-**204** | pull request deleted successfully | - |
-**401** | Unauthorized | - |
-**403** | Forbidden | - |
-**404** | Resource Not Found | - |
-**420** | too many requests | - |
-**0** | Internal Server Error | - |
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
# **delete_user_external_principal**
> delete_user_external_principal(user_id, principal_id)
@@ -1167,6 +1057,7 @@ Name | Type | Description | Notes
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | pull request | - |
+**400** | Validation Error | - |
**401** | Unauthorized | - |
**404** | Resource Not Found | - |
**420** | too many requests | - |
@@ -1728,7 +1619,8 @@ void (empty response body)
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**204** | pull request deleted successfully | - |
+**200** | pull request updated successfully | - |
+**400** | Validation Error | - |
**401** | Unauthorized | - |
**403** | Forbidden | - |
**404** | Resource Not Found | - |
diff --git a/clients/python-legacy/docs/PullsApi.md b/clients/python-legacy/docs/PullsApi.md
index b039551c41a..d5ea90706e9 100644
--- a/clients/python-legacy/docs/PullsApi.md
+++ b/clients/python-legacy/docs/PullsApi.md
@@ -5,7 +5,6 @@ All URIs are relative to *http://localhost/api/v1*
Method | HTTP request | Description
------------- | ------------- | -------------
[**create_pull_request**](PullsApi.md#create_pull_request) | **POST** /repositories/{repository}/pulls | create pull request
-[**delete_pull_request**](PullsApi.md#delete_pull_request) | **DELETE** /repositories/{repository}/pulls/{pull_request} | delete pull request
[**get_pull_request**](PullsApi.md#get_pull_request) | **GET** /repositories/{repository}/pulls/{pull_request} | get pull request
[**list_pull_requests**](PullsApi.md#list_pull_requests) | **GET** /repositories/{repository}/pulls | list pull requests
[**update_pull_request**](PullsApi.md#update_pull_request) | **PATCH** /repositories/{repository}/pulls/{pull_request} | update pull request
@@ -129,115 +128,6 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-# **delete_pull_request**
-> delete_pull_request(repository, pull_request)
-
-delete pull request
-
-### Example
-
-* Basic Authentication (basic_auth):
-* Api Key Authentication (cookie_auth):
-* Bearer (JWT) Authentication (jwt_token):
-* Api Key Authentication (oidc_auth):
-* Api Key Authentication (saml_auth):
-
-```python
-import time
-import lakefs_client
-from lakefs_client.api import pulls_api
-from lakefs_client.model.error import Error
-from pprint import pprint
-# Defining the host is optional and defaults to http://localhost/api/v1
-# See configuration.py for a list of all supported configuration parameters.
-configuration = lakefs_client.Configuration(
- host = "http://localhost/api/v1"
-)
-
-# The client must configure the authentication and authorization parameters
-# in accordance with the API server security policy.
-# Examples for each auth method are provided below, use the example that
-# satisfies your auth use case.
-
-# Configure HTTP basic authorization: basic_auth
-configuration = lakefs_client.Configuration(
- username = 'YOUR_USERNAME',
- password = 'YOUR_PASSWORD'
-)
-
-# Configure API key authorization: cookie_auth
-configuration.api_key['cookie_auth'] = 'YOUR_API_KEY'
-
-# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['cookie_auth'] = 'Bearer'
-
-# Configure Bearer authorization (JWT): jwt_token
-configuration = lakefs_client.Configuration(
- access_token = 'YOUR_BEARER_TOKEN'
-)
-
-# Configure API key authorization: oidc_auth
-configuration.api_key['oidc_auth'] = 'YOUR_API_KEY'
-
-# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['oidc_auth'] = 'Bearer'
-
-# Configure API key authorization: saml_auth
-configuration.api_key['saml_auth'] = 'YOUR_API_KEY'
-
-# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['saml_auth'] = 'Bearer'
-
-# Enter a context with an instance of the API client
-with lakefs_client.ApiClient(configuration) as api_client:
- # Create an instance of the API class
- api_instance = pulls_api.PullsApi(api_client)
- repository = "repository_example" # str |
- pull_request = "pull_request_example" # str | pull request id
-
- # example passing only required values which don't have defaults set
- try:
- # delete pull request
- api_instance.delete_pull_request(repository, pull_request)
- except lakefs_client.ApiException as e:
- print("Exception when calling PullsApi->delete_pull_request: %s\n" % e)
-```
-
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **repository** | **str**| |
- **pull_request** | **str**| pull request id |
-
-### Return type
-
-void (empty response body)
-
-### Authorization
-
-[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [jwt_token](../README.md#jwt_token), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth)
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/json
-
-
-### HTTP response details
-
-| Status code | Description | Response headers |
-|-------------|-------------|------------------|
-**204** | pull request deleted successfully | - |
-**401** | Unauthorized | - |
-**403** | Forbidden | - |
-**404** | Resource Not Found | - |
-**420** | too many requests | - |
-**0** | Internal Server Error | - |
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
# **get_pull_request**
> PullRequest get_pull_request(repository, pull_request)
@@ -341,6 +231,7 @@ Name | Type | Description | Notes
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | pull request | - |
+**400** | Validation Error | - |
**401** | Unauthorized | - |
**404** | Resource Not Found | - |
**420** | too many requests | - |
@@ -580,7 +471,8 @@ void (empty response body)
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**204** | pull request deleted successfully | - |
+**200** | pull request updated successfully | - |
+**400** | Validation Error | - |
**401** | Unauthorized | - |
**403** | Forbidden | - |
**404** | Resource Not Found | - |
diff --git a/clients/python-legacy/lakefs_client/api/experimental_api.py b/clients/python-legacy/lakefs_client/api/experimental_api.py
index c4f5bca7cec..a85abef90ff 100644
--- a/clients/python-legacy/lakefs_client/api/experimental_api.py
+++ b/clients/python-legacy/lakefs_client/api/experimental_api.py
@@ -411,67 +411,6 @@ def __init__(self, api_client=None):
},
api_client=api_client
)
- self.delete_pull_request_endpoint = _Endpoint(
- settings={
- 'response_type': None,
- 'auth': [
- 'basic_auth',
- 'cookie_auth',
- 'jwt_token',
- 'oidc_auth',
- 'saml_auth'
- ],
- 'endpoint_path': '/repositories/{repository}/pulls/{pull_request}',
- 'operation_id': 'delete_pull_request',
- 'http_method': 'DELETE',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'repository',
- 'pull_request',
- ],
- 'required': [
- 'repository',
- 'pull_request',
- ],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'repository':
- (str,),
- 'pull_request':
- (str,),
- },
- 'attribute_map': {
- 'repository': 'repository',
- 'pull_request': 'pull_request',
- },
- 'location_map': {
- 'repository': 'path',
- 'pull_request': 'path',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json'
- ],
- 'content_type': [],
- },
- api_client=api_client
- )
self.delete_user_external_principal_endpoint = _Endpoint(
settings={
'response_type': None,
@@ -1424,75 +1363,6 @@ def create_user_external_principal(
principal_id
return self.create_user_external_principal_endpoint.call_with_http_info(**kwargs)
- def delete_pull_request(
- self,
- repository,
- pull_request,
- **kwargs
- ):
- """delete pull request # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.delete_pull_request(repository, pull_request, async_req=True)
- >>> result = thread.get()
-
- Args:
- repository (str):
- pull_request (str): pull request id
-
- Keyword Args:
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): timeout setting for this request. If
- one number provided, it will be total request timeout. It can also
- be a pair (tuple) of (connection, read) timeouts.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- None
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_host_index'] = kwargs.get('_host_index')
- kwargs['repository'] = \
- repository
- kwargs['pull_request'] = \
- pull_request
- return self.delete_pull_request_endpoint.call_with_http_info(**kwargs)
-
def delete_user_external_principal(
self,
user_id,
diff --git a/clients/python-legacy/lakefs_client/api/pulls_api.py b/clients/python-legacy/lakefs_client/api/pulls_api.py
index 5055a4a15f1..bddebd1088c 100644
--- a/clients/python-legacy/lakefs_client/api/pulls_api.py
+++ b/clients/python-legacy/lakefs_client/api/pulls_api.py
@@ -103,67 +103,6 @@ def __init__(self, api_client=None):
},
api_client=api_client
)
- self.delete_pull_request_endpoint = _Endpoint(
- settings={
- 'response_type': None,
- 'auth': [
- 'basic_auth',
- 'cookie_auth',
- 'jwt_token',
- 'oidc_auth',
- 'saml_auth'
- ],
- 'endpoint_path': '/repositories/{repository}/pulls/{pull_request}',
- 'operation_id': 'delete_pull_request',
- 'http_method': 'DELETE',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'repository',
- 'pull_request',
- ],
- 'required': [
- 'repository',
- 'pull_request',
- ],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'repository':
- (str,),
- 'pull_request':
- (str,),
- },
- 'attribute_map': {
- 'repository': 'repository',
- 'pull_request': 'pull_request',
- },
- 'location_map': {
- 'repository': 'path',
- 'pull_request': 'path',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json'
- ],
- 'content_type': [],
- },
- api_client=api_client
- )
self.get_pull_request_endpoint = _Endpoint(
settings={
'response_type': (PullRequest,),
@@ -451,75 +390,6 @@ def create_pull_request(
pull_request_creation
return self.create_pull_request_endpoint.call_with_http_info(**kwargs)
- def delete_pull_request(
- self,
- repository,
- pull_request,
- **kwargs
- ):
- """delete pull request # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.delete_pull_request(repository, pull_request, async_req=True)
- >>> result = thread.get()
-
- Args:
- repository (str):
- pull_request (str): pull request id
-
- Keyword Args:
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): timeout setting for this request. If
- one number provided, it will be total request timeout. It can also
- be a pair (tuple) of (connection, read) timeouts.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- None
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_host_index'] = kwargs.get('_host_index')
- kwargs['repository'] = \
- repository
- kwargs['pull_request'] = \
- pull_request
- return self.delete_pull_request_endpoint.call_with_http_info(**kwargs)
-
def get_pull_request(
self,
repository,
diff --git a/clients/python-legacy/test/test_experimental_api.py b/clients/python-legacy/test/test_experimental_api.py
index f02468344b3..abe104b119f 100644
--- a/clients/python-legacy/test/test_experimental_api.py
+++ b/clients/python-legacy/test/test_experimental_api.py
@@ -59,13 +59,6 @@ def test_create_user_external_principal(self):
"""
pass
- def test_delete_pull_request(self):
- """Test case for delete_pull_request
-
- delete pull request # noqa: E501
- """
- pass
-
def test_delete_user_external_principal(self):
"""Test case for delete_user_external_principal
diff --git a/clients/python-legacy/test/test_pulls_api.py b/clients/python-legacy/test/test_pulls_api.py
index 8ad5e061029..f9bc874613a 100644
--- a/clients/python-legacy/test/test_pulls_api.py
+++ b/clients/python-legacy/test/test_pulls_api.py
@@ -31,13 +31,6 @@ def test_create_pull_request(self):
"""
pass
- def test_delete_pull_request(self):
- """Test case for delete_pull_request
-
- delete pull request # noqa: E501
- """
- pass
-
def test_get_pull_request(self):
"""Test case for get_pull_request
diff --git a/clients/python/README.md b/clients/python/README.md
index 2699707241a..5d4401bc7a8 100644
--- a/clients/python/README.md
+++ b/clients/python/README.md
@@ -175,7 +175,6 @@ Class | Method | HTTP request | Description
*ExperimentalApi* | [**create_presign_multipart_upload**](docs/ExperimentalApi.md#create_presign_multipart_upload) | **POST** /repositories/{repository}/branches/{branch}/staging/pmpu | Initiate a multipart upload
*ExperimentalApi* | [**create_pull_request**](docs/ExperimentalApi.md#create_pull_request) | **POST** /repositories/{repository}/pulls | create pull request
*ExperimentalApi* | [**create_user_external_principal**](docs/ExperimentalApi.md#create_user_external_principal) | **POST** /auth/users/{userId}/external/principals | attach external principal to user
-*ExperimentalApi* | [**delete_pull_request**](docs/ExperimentalApi.md#delete_pull_request) | **DELETE** /repositories/{repository}/pulls/{pull_request} | delete pull request
*ExperimentalApi* | [**delete_user_external_principal**](docs/ExperimentalApi.md#delete_user_external_principal) | **DELETE** /auth/users/{userId}/external/principals | delete external principal from user
*ExperimentalApi* | [**external_principal_login**](docs/ExperimentalApi.md#external_principal_login) | **POST** /auth/external/principal/login | perform a login using an external authenticator
*ExperimentalApi* | [**get_external_principal**](docs/ExperimentalApi.md#get_external_principal) | **GET** /auth/external/principals | describe external principal by id
@@ -234,7 +233,6 @@ Class | Method | HTTP request | Description
*ObjectsApi* | [**stat_object**](docs/ObjectsApi.md#stat_object) | **GET** /repositories/{repository}/refs/{ref}/objects/stat | get object metadata
*ObjectsApi* | [**upload_object**](docs/ObjectsApi.md#upload_object) | **POST** /repositories/{repository}/branches/{branch}/objects |
*PullsApi* | [**create_pull_request**](docs/PullsApi.md#create_pull_request) | **POST** /repositories/{repository}/pulls | create pull request
-*PullsApi* | [**delete_pull_request**](docs/PullsApi.md#delete_pull_request) | **DELETE** /repositories/{repository}/pulls/{pull_request} | delete pull request
*PullsApi* | [**get_pull_request**](docs/PullsApi.md#get_pull_request) | **GET** /repositories/{repository}/pulls/{pull_request} | get pull request
*PullsApi* | [**list_pull_requests**](docs/PullsApi.md#list_pull_requests) | **GET** /repositories/{repository}/pulls | list pull requests
*PullsApi* | [**update_pull_request**](docs/PullsApi.md#update_pull_request) | **PATCH** /repositories/{repository}/pulls/{pull_request} | update pull request
diff --git a/clients/python/docs/ExperimentalApi.md b/clients/python/docs/ExperimentalApi.md
index b58e97e9cdb..b4333dadf8f 100644
--- a/clients/python/docs/ExperimentalApi.md
+++ b/clients/python/docs/ExperimentalApi.md
@@ -9,7 +9,6 @@ Method | HTTP request | Description
[**create_presign_multipart_upload**](ExperimentalApi.md#create_presign_multipart_upload) | **POST** /repositories/{repository}/branches/{branch}/staging/pmpu | Initiate a multipart upload
[**create_pull_request**](ExperimentalApi.md#create_pull_request) | **POST** /repositories/{repository}/pulls | create pull request
[**create_user_external_principal**](ExperimentalApi.md#create_user_external_principal) | **POST** /auth/users/{userId}/external/principals | attach external principal to user
-[**delete_pull_request**](ExperimentalApi.md#delete_pull_request) | **DELETE** /repositories/{repository}/pulls/{pull_request} | delete pull request
[**delete_user_external_principal**](ExperimentalApi.md#delete_user_external_principal) | **DELETE** /auth/users/{userId}/external/principals | delete external principal from user
[**external_principal_login**](ExperimentalApi.md#external_principal_login) | **POST** /auth/external/principal/login | perform a login using an external authenticator
[**get_external_principal**](ExperimentalApi.md#get_external_principal) | **GET** /auth/external/principals | describe external principal by id
@@ -610,116 +609,6 @@ void (empty response body)
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-# **delete_pull_request**
-> delete_pull_request(repository, pull_request)
-
-delete pull request
-
-### Example
-
-* Basic Authentication (basic_auth):
-* Api Key Authentication (cookie_auth):
-* Api Key Authentication (oidc_auth):
-* Api Key Authentication (saml_auth):
-* Bearer (JWT) Authentication (jwt_token):
-
-```python
-import time
-import os
-import lakefs_sdk
-from lakefs_sdk.rest import ApiException
-from pprint import pprint
-
-# Defining the host is optional and defaults to /api/v1
-# See configuration.py for a list of all supported configuration parameters.
-configuration = lakefs_sdk.Configuration(
- host = "/api/v1"
-)
-
-# The client must configure the authentication and authorization parameters
-# in accordance with the API server security policy.
-# Examples for each auth method are provided below, use the example that
-# satisfies your auth use case.
-
-# Configure HTTP basic authorization: basic_auth
-configuration = lakefs_sdk.Configuration(
- username = os.environ["USERNAME"],
- password = os.environ["PASSWORD"]
-)
-
-# Configure API key authorization: cookie_auth
-configuration.api_key['cookie_auth'] = os.environ["API_KEY"]
-
-# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['cookie_auth'] = 'Bearer'
-
-# Configure API key authorization: oidc_auth
-configuration.api_key['oidc_auth'] = os.environ["API_KEY"]
-
-# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['oidc_auth'] = 'Bearer'
-
-# Configure API key authorization: saml_auth
-configuration.api_key['saml_auth'] = os.environ["API_KEY"]
-
-# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['saml_auth'] = 'Bearer'
-
-# Configure Bearer authorization (JWT): jwt_token
-configuration = lakefs_sdk.Configuration(
- access_token = os.environ["BEARER_TOKEN"]
-)
-
-# Enter a context with an instance of the API client
-with lakefs_sdk.ApiClient(configuration) as api_client:
- # Create an instance of the API class
- api_instance = lakefs_sdk.ExperimentalApi(api_client)
- repository = 'repository_example' # str |
- pull_request = 'pull_request_example' # str | pull request id
-
- try:
- # delete pull request
- api_instance.delete_pull_request(repository, pull_request)
- except Exception as e:
- print("Exception when calling ExperimentalApi->delete_pull_request: %s\n" % e)
-```
-
-
-
-### Parameters
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **repository** | **str**| |
- **pull_request** | **str**| pull request id |
-
-### Return type
-
-void (empty response body)
-
-### Authorization
-
-[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token)
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/json
-
-### HTTP response details
-
-| Status code | Description | Response headers |
-|-------------|-------------|------------------|
-**204** | pull request deleted successfully | - |
-**401** | Unauthorized | - |
-**403** | Forbidden | - |
-**404** | Resource Not Found | - |
-**420** | too many requests | - |
-**0** | Internal Server Error | - |
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
# **delete_user_external_principal**
> delete_user_external_principal(user_id, principal_id)
@@ -1119,6 +1008,7 @@ Name | Type | Description | Notes
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | pull request | - |
+**400** | Validation Error | - |
**401** | Unauthorized | - |
**404** | Resource Not Found | - |
**420** | too many requests | - |
@@ -1653,7 +1543,8 @@ void (empty response body)
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**204** | pull request deleted successfully | - |
+**200** | pull request updated successfully | - |
+**400** | Validation Error | - |
**401** | Unauthorized | - |
**403** | Forbidden | - |
**404** | Resource Not Found | - |
diff --git a/clients/python/docs/PullsApi.md b/clients/python/docs/PullsApi.md
index 102400da3b9..70a6e2facd8 100644
--- a/clients/python/docs/PullsApi.md
+++ b/clients/python/docs/PullsApi.md
@@ -5,7 +5,6 @@ All URIs are relative to */api/v1*
Method | HTTP request | Description
------------- | ------------- | -------------
[**create_pull_request**](PullsApi.md#create_pull_request) | **POST** /repositories/{repository}/pulls | create pull request
-[**delete_pull_request**](PullsApi.md#delete_pull_request) | **DELETE** /repositories/{repository}/pulls/{pull_request} | delete pull request
[**get_pull_request**](PullsApi.md#get_pull_request) | **GET** /repositories/{repository}/pulls/{pull_request} | get pull request
[**list_pull_requests**](PullsApi.md#list_pull_requests) | **GET** /repositories/{repository}/pulls | list pull requests
[**update_pull_request**](PullsApi.md#update_pull_request) | **PATCH** /repositories/{repository}/pulls/{pull_request} | update pull request
@@ -126,116 +125,6 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-# **delete_pull_request**
-> delete_pull_request(repository, pull_request)
-
-delete pull request
-
-### Example
-
-* Basic Authentication (basic_auth):
-* Api Key Authentication (cookie_auth):
-* Api Key Authentication (oidc_auth):
-* Api Key Authentication (saml_auth):
-* Bearer (JWT) Authentication (jwt_token):
-
-```python
-import time
-import os
-import lakefs_sdk
-from lakefs_sdk.rest import ApiException
-from pprint import pprint
-
-# Defining the host is optional and defaults to /api/v1
-# See configuration.py for a list of all supported configuration parameters.
-configuration = lakefs_sdk.Configuration(
- host = "/api/v1"
-)
-
-# The client must configure the authentication and authorization parameters
-# in accordance with the API server security policy.
-# Examples for each auth method are provided below, use the example that
-# satisfies your auth use case.
-
-# Configure HTTP basic authorization: basic_auth
-configuration = lakefs_sdk.Configuration(
- username = os.environ["USERNAME"],
- password = os.environ["PASSWORD"]
-)
-
-# Configure API key authorization: cookie_auth
-configuration.api_key['cookie_auth'] = os.environ["API_KEY"]
-
-# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['cookie_auth'] = 'Bearer'
-
-# Configure API key authorization: oidc_auth
-configuration.api_key['oidc_auth'] = os.environ["API_KEY"]
-
-# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['oidc_auth'] = 'Bearer'
-
-# Configure API key authorization: saml_auth
-configuration.api_key['saml_auth'] = os.environ["API_KEY"]
-
-# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-# configuration.api_key_prefix['saml_auth'] = 'Bearer'
-
-# Configure Bearer authorization (JWT): jwt_token
-configuration = lakefs_sdk.Configuration(
- access_token = os.environ["BEARER_TOKEN"]
-)
-
-# Enter a context with an instance of the API client
-with lakefs_sdk.ApiClient(configuration) as api_client:
- # Create an instance of the API class
- api_instance = lakefs_sdk.PullsApi(api_client)
- repository = 'repository_example' # str |
- pull_request = 'pull_request_example' # str | pull request id
-
- try:
- # delete pull request
- api_instance.delete_pull_request(repository, pull_request)
- except Exception as e:
- print("Exception when calling PullsApi->delete_pull_request: %s\n" % e)
-```
-
-
-
-### Parameters
-
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **repository** | **str**| |
- **pull_request** | **str**| pull request id |
-
-### Return type
-
-void (empty response body)
-
-### Authorization
-
-[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token)
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/json
-
-### HTTP response details
-
-| Status code | Description | Response headers |
-|-------------|-------------|------------------|
-**204** | pull request deleted successfully | - |
-**401** | Unauthorized | - |
-**403** | Forbidden | - |
-**404** | Resource Not Found | - |
-**420** | too many requests | - |
-**0** | Internal Server Error | - |
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
# **get_pull_request**
> PullRequest get_pull_request(repository, pull_request)
@@ -341,6 +230,7 @@ Name | Type | Description | Notes
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | pull request | - |
+**400** | Validation Error | - |
**401** | Unauthorized | - |
**404** | Resource Not Found | - |
**420** | too many requests | - |
@@ -570,7 +460,8 @@ void (empty response body)
| Status code | Description | Response headers |
|-------------|-------------|------------------|
-**204** | pull request deleted successfully | - |
+**200** | pull request updated successfully | - |
+**400** | Validation Error | - |
**401** | Unauthorized | - |
**403** | Forbidden | - |
**404** | Resource Not Found | - |
diff --git a/clients/python/lakefs_sdk/api/experimental_api.py b/clients/python/lakefs_sdk/api/experimental_api.py
index 09a9d7685bd..7481eca6c4e 100644
--- a/clients/python/lakefs_sdk/api/experimental_api.py
+++ b/clients/python/lakefs_sdk/api/experimental_api.py
@@ -907,149 +907,6 @@ def create_user_external_principal_with_http_info(self, user_id : StrictStr, pri
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def delete_pull_request(self, repository : StrictStr, pull_request : Annotated[StrictStr, Field(..., description="pull request id")], **kwargs) -> None: # noqa: E501
- """delete pull request # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.delete_pull_request(repository, pull_request, async_req=True)
- >>> result = thread.get()
-
- :param repository: (required)
- :type repository: str
- :param pull_request: pull request id (required)
- :type pull_request: str
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: None
- """
- kwargs['_return_http_data_only'] = True
- if '_preload_content' in kwargs:
- raise ValueError("Error! Please call the delete_pull_request_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
- return self.delete_pull_request_with_http_info(repository, pull_request, **kwargs) # noqa: E501
-
- @validate_arguments
- def delete_pull_request_with_http_info(self, repository : StrictStr, pull_request : Annotated[StrictStr, Field(..., description="pull request id")], **kwargs) -> ApiResponse: # noqa: E501
- """delete pull request # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.delete_pull_request_with_http_info(repository, pull_request, async_req=True)
- >>> result = thread.get()
-
- :param repository: (required)
- :type repository: str
- :param pull_request: pull request id (required)
- :type pull_request: str
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _preload_content: if False, the ApiResponse.data will
- be set to none and raw_data will store the
- HTTP response body without reading/decoding.
- Default is True.
- :type _preload_content: bool, optional
- :param _return_http_data_only: response data instead of ApiResponse
- object with status code, headers, etc
- :type _return_http_data_only: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :param _request_auth: set to override the auth_settings for an a single
- request; this effectively ignores the authentication
- in the spec for a single request.
- :type _request_auth: dict, optional
- :type _content_type: string, optional: force content-type for the request
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: None
- """
-
- _params = locals()
-
- _all_params = [
- 'repository',
- 'pull_request'
- ]
- _all_params.extend(
- [
- 'async_req',
- '_return_http_data_only',
- '_preload_content',
- '_request_timeout',
- '_request_auth',
- '_content_type',
- '_headers'
- ]
- )
-
- # validate the arguments
- for _key, _val in _params['kwargs'].items():
- if _key not in _all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method delete_pull_request" % _key
- )
- _params[_key] = _val
- del _params['kwargs']
-
- _collection_formats = {}
-
- # process the path parameters
- _path_params = {}
- if _params['repository']:
- _path_params['repository'] = _params['repository']
-
- if _params['pull_request']:
- _path_params['pull_request'] = _params['pull_request']
-
-
- # process the query parameters
- _query_params = []
- # process the header parameters
- _header_params = dict(_params.get('_headers', {}))
- # process the form parameters
- _form_params = []
- _files = {}
- # process the body parameter
- _body_params = None
- # set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # authentication setting
- _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501
-
- _response_types_map = {}
-
- return self.api_client.call_api(
- '/repositories/{repository}/pulls/{pull_request}', 'DELETE',
- _path_params,
- _query_params,
- _header_params,
- body=_body_params,
- post_params=_form_params,
- files=_files,
- response_types_map=_response_types_map,
- auth_settings=_auth_settings,
- async_req=_params.get('async_req'),
- _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=_params.get('_preload_content', True),
- _request_timeout=_params.get('_request_timeout'),
- collection_formats=_collection_formats,
- _request_auth=_params.get('_request_auth'))
-
@validate_arguments
def delete_user_external_principal(self, user_id : StrictStr, principal_id : StrictStr, **kwargs) -> None: # noqa: E501
"""delete external principal from user # noqa: E501
@@ -1608,6 +1465,7 @@ def get_pull_request_with_http_info(self, repository : StrictStr, pull_request :
_response_types_map = {
'200': "PullRequest",
+ '400': "Error",
'401': "Error",
'404': "Error",
'420': None,
diff --git a/clients/python/lakefs_sdk/api/pulls_api.py b/clients/python/lakefs_sdk/api/pulls_api.py
index 4bf145f141f..6ef5e968cda 100644
--- a/clients/python/lakefs_sdk/api/pulls_api.py
+++ b/clients/python/lakefs_sdk/api/pulls_api.py
@@ -213,149 +213,6 @@ def create_pull_request_with_http_info(self, repository : StrictStr, pull_reques
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
- @validate_arguments
- def delete_pull_request(self, repository : StrictStr, pull_request : Annotated[StrictStr, Field(..., description="pull request id")], **kwargs) -> None: # noqa: E501
- """delete pull request # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.delete_pull_request(repository, pull_request, async_req=True)
- >>> result = thread.get()
-
- :param repository: (required)
- :type repository: str
- :param pull_request: pull request id (required)
- :type pull_request: str
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: None
- """
- kwargs['_return_http_data_only'] = True
- if '_preload_content' in kwargs:
- raise ValueError("Error! Please call the delete_pull_request_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data")
- return self.delete_pull_request_with_http_info(repository, pull_request, **kwargs) # noqa: E501
-
- @validate_arguments
- def delete_pull_request_with_http_info(self, repository : StrictStr, pull_request : Annotated[StrictStr, Field(..., description="pull request id")], **kwargs) -> ApiResponse: # noqa: E501
- """delete pull request # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.delete_pull_request_with_http_info(repository, pull_request, async_req=True)
- >>> result = thread.get()
-
- :param repository: (required)
- :type repository: str
- :param pull_request: pull request id (required)
- :type pull_request: str
- :param async_req: Whether to execute the request asynchronously.
- :type async_req: bool, optional
- :param _preload_content: if False, the ApiResponse.data will
- be set to none and raw_data will store the
- HTTP response body without reading/decoding.
- Default is True.
- :type _preload_content: bool, optional
- :param _return_http_data_only: response data instead of ApiResponse
- object with status code, headers, etc
- :type _return_http_data_only: bool, optional
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :param _request_auth: set to override the auth_settings for an a single
- request; this effectively ignores the authentication
- in the spec for a single request.
- :type _request_auth: dict, optional
- :type _content_type: string, optional: force content-type for the request
- :return: Returns the result object.
- If the method is called asynchronously,
- returns the request thread.
- :rtype: None
- """
-
- _params = locals()
-
- _all_params = [
- 'repository',
- 'pull_request'
- ]
- _all_params.extend(
- [
- 'async_req',
- '_return_http_data_only',
- '_preload_content',
- '_request_timeout',
- '_request_auth',
- '_content_type',
- '_headers'
- ]
- )
-
- # validate the arguments
- for _key, _val in _params['kwargs'].items():
- if _key not in _all_params:
- raise ApiTypeError(
- "Got an unexpected keyword argument '%s'"
- " to method delete_pull_request" % _key
- )
- _params[_key] = _val
- del _params['kwargs']
-
- _collection_formats = {}
-
- # process the path parameters
- _path_params = {}
- if _params['repository']:
- _path_params['repository'] = _params['repository']
-
- if _params['pull_request']:
- _path_params['pull_request'] = _params['pull_request']
-
-
- # process the query parameters
- _query_params = []
- # process the header parameters
- _header_params = dict(_params.get('_headers', {}))
- # process the form parameters
- _form_params = []
- _files = {}
- # process the body parameter
- _body_params = None
- # set the HTTP header `Accept`
- _header_params['Accept'] = self.api_client.select_header_accept(
- ['application/json']) # noqa: E501
-
- # authentication setting
- _auth_settings = ['basic_auth', 'cookie_auth', 'oidc_auth', 'saml_auth', 'jwt_token'] # noqa: E501
-
- _response_types_map = {}
-
- return self.api_client.call_api(
- '/repositories/{repository}/pulls/{pull_request}', 'DELETE',
- _path_params,
- _query_params,
- _header_params,
- body=_body_params,
- post_params=_form_params,
- files=_files,
- response_types_map=_response_types_map,
- auth_settings=_auth_settings,
- async_req=_params.get('async_req'),
- _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
- _preload_content=_params.get('_preload_content', True),
- _request_timeout=_params.get('_request_timeout'),
- collection_formats=_collection_formats,
- _request_auth=_params.get('_request_auth'))
-
@validate_arguments
def get_pull_request(self, repository : StrictStr, pull_request : Annotated[StrictStr, Field(..., description="pull request id")], **kwargs) -> PullRequest: # noqa: E501
"""get pull request # noqa: E501
@@ -482,6 +339,7 @@ def get_pull_request_with_http_info(self, repository : StrictStr, pull_request :
_response_types_map = {
'200': "PullRequest",
+ '400': "Error",
'401': "Error",
'404': "Error",
'420': None,
diff --git a/clients/python/test/test_experimental_api.py b/clients/python/test/test_experimental_api.py
index 07290c77594..d1921fd9532 100644
--- a/clients/python/test/test_experimental_api.py
+++ b/clients/python/test/test_experimental_api.py
@@ -64,13 +64,6 @@ def test_create_user_external_principal(self):
"""
pass
- def test_delete_pull_request(self):
- """Test case for delete_pull_request
-
- delete pull request # noqa: E501
- """
- pass
-
def test_delete_user_external_principal(self):
"""Test case for delete_user_external_principal
diff --git a/clients/python/test/test_pulls_api.py b/clients/python/test/test_pulls_api.py
index 00a530dd045..2229716c875 100644
--- a/clients/python/test/test_pulls_api.py
+++ b/clients/python/test/test_pulls_api.py
@@ -36,13 +36,6 @@ def test_create_pull_request(self):
"""
pass
- def test_delete_pull_request(self):
- """Test case for delete_pull_request
-
- delete pull request # noqa: E501
- """
- pass
-
def test_get_pull_request(self):
"""Test case for get_pull_request
diff --git a/clients/rust/README.md b/clients/rust/README.md
index 613ea0bc568..142da0ff989 100644
--- a/clients/rust/README.md
+++ b/clients/rust/README.md
@@ -82,7 +82,6 @@ Class | Method | HTTP request | Description
*ExperimentalApi* | [**create_presign_multipart_upload**](docs/ExperimentalApi.md#create_presign_multipart_upload) | **POST** /repositories/{repository}/branches/{branch}/staging/pmpu | Initiate a multipart upload
*ExperimentalApi* | [**create_pull_request**](docs/ExperimentalApi.md#create_pull_request) | **POST** /repositories/{repository}/pulls | create pull request
*ExperimentalApi* | [**create_user_external_principal**](docs/ExperimentalApi.md#create_user_external_principal) | **POST** /auth/users/{userId}/external/principals | attach external principal to user
-*ExperimentalApi* | [**delete_pull_request**](docs/ExperimentalApi.md#delete_pull_request) | **DELETE** /repositories/{repository}/pulls/{pull_request} | delete pull request
*ExperimentalApi* | [**delete_user_external_principal**](docs/ExperimentalApi.md#delete_user_external_principal) | **DELETE** /auth/users/{userId}/external/principals | delete external principal from user
*ExperimentalApi* | [**external_principal_login**](docs/ExperimentalApi.md#external_principal_login) | **POST** /auth/external/principal/login | perform a login using an external authenticator
*ExperimentalApi* | [**get_external_principal**](docs/ExperimentalApi.md#get_external_principal) | **GET** /auth/external/principals | describe external principal by id
@@ -141,7 +140,6 @@ Class | Method | HTTP request | Description
*ObjectsApi* | [**stat_object**](docs/ObjectsApi.md#stat_object) | **GET** /repositories/{repository}/refs/{ref}/objects/stat | get object metadata
*ObjectsApi* | [**upload_object**](docs/ObjectsApi.md#upload_object) | **POST** /repositories/{repository}/branches/{branch}/objects |
*PullsApi* | [**create_pull_request**](docs/PullsApi.md#create_pull_request) | **POST** /repositories/{repository}/pulls | create pull request
-*PullsApi* | [**delete_pull_request**](docs/PullsApi.md#delete_pull_request) | **DELETE** /repositories/{repository}/pulls/{pull_request} | delete pull request
*PullsApi* | [**get_pull_request**](docs/PullsApi.md#get_pull_request) | **GET** /repositories/{repository}/pulls/{pull_request} | get pull request
*PullsApi* | [**list_pull_requests**](docs/PullsApi.md#list_pull_requests) | **GET** /repositories/{repository}/pulls | list pull requests
*PullsApi* | [**update_pull_request**](docs/PullsApi.md#update_pull_request) | **PATCH** /repositories/{repository}/pulls/{pull_request} | update pull request
diff --git a/clients/rust/docs/ExperimentalApi.md b/clients/rust/docs/ExperimentalApi.md
index 7305a996f5f..7cdab9b6b35 100644
--- a/clients/rust/docs/ExperimentalApi.md
+++ b/clients/rust/docs/ExperimentalApi.md
@@ -9,7 +9,6 @@ Method | HTTP request | Description
[**create_presign_multipart_upload**](ExperimentalApi.md#create_presign_multipart_upload) | **POST** /repositories/{repository}/branches/{branch}/staging/pmpu | Initiate a multipart upload
[**create_pull_request**](ExperimentalApi.md#create_pull_request) | **POST** /repositories/{repository}/pulls | create pull request
[**create_user_external_principal**](ExperimentalApi.md#create_user_external_principal) | **POST** /auth/users/{userId}/external/principals | attach external principal to user
-[**delete_pull_request**](ExperimentalApi.md#delete_pull_request) | **DELETE** /repositories/{repository}/pulls/{pull_request} | delete pull request
[**delete_user_external_principal**](ExperimentalApi.md#delete_user_external_principal) | **DELETE** /auth/users/{userId}/external/principals | delete external principal from user
[**external_principal_login**](ExperimentalApi.md#external_principal_login) | **POST** /auth/external/principal/login | perform a login using an external authenticator
[**get_external_principal**](ExperimentalApi.md#get_external_principal) | **GET** /auth/external/principals | describe external principal by id
@@ -182,35 +181,6 @@ Name | Type | Description | Required | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-## delete_pull_request
-
-> delete_pull_request(repository, pull_request)
-delete pull request
-
-### Parameters
-
-
-Name | Type | Description | Required | Notes
-------------- | ------------- | ------------- | ------------- | -------------
-**repository** | **String** | | [required] |
-**pull_request** | **String** | pull request id | [required] |
-
-### Return type
-
- (empty response body)
-
-### Authorization
-
-[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token)
-
-### HTTP request headers
-
-- **Content-Type**: Not defined
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-
## delete_user_external_principal
> delete_user_external_principal(user_id, principal_id)
diff --git a/clients/rust/docs/PullsApi.md b/clients/rust/docs/PullsApi.md
index f8a932ec0eb..ab0d269e722 100644
--- a/clients/rust/docs/PullsApi.md
+++ b/clients/rust/docs/PullsApi.md
@@ -5,7 +5,6 @@ All URIs are relative to */api/v1*
Method | HTTP request | Description
------------- | ------------- | -------------
[**create_pull_request**](PullsApi.md#create_pull_request) | **POST** /repositories/{repository}/pulls | create pull request
-[**delete_pull_request**](PullsApi.md#delete_pull_request) | **DELETE** /repositories/{repository}/pulls/{pull_request} | delete pull request
[**get_pull_request**](PullsApi.md#get_pull_request) | **GET** /repositories/{repository}/pulls/{pull_request} | get pull request
[**list_pull_requests**](PullsApi.md#list_pull_requests) | **GET** /repositories/{repository}/pulls | list pull requests
[**update_pull_request**](PullsApi.md#update_pull_request) | **PATCH** /repositories/{repository}/pulls/{pull_request} | update pull request
@@ -41,35 +40,6 @@ Name | Type | Description | Required | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-## delete_pull_request
-
-> delete_pull_request(repository, pull_request)
-delete pull request
-
-### Parameters
-
-
-Name | Type | Description | Required | Notes
-------------- | ------------- | ------------- | ------------- | -------------
-**repository** | **String** | | [required] |
-**pull_request** | **String** | pull request id | [required] |
-
-### Return type
-
- (empty response body)
-
-### Authorization
-
-[basic_auth](../README.md#basic_auth), [cookie_auth](../README.md#cookie_auth), [oidc_auth](../README.md#oidc_auth), [saml_auth](../README.md#saml_auth), [jwt_token](../README.md#jwt_token)
-
-### HTTP request headers
-
-- **Content-Type**: Not defined
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-
## get_pull_request
> models::PullRequest get_pull_request(repository, pull_request)
diff --git a/clients/rust/src/apis/experimental_api.rs b/clients/rust/src/apis/experimental_api.rs
index aefceaa641f..687c3fc0646 100644
--- a/clients/rust/src/apis/experimental_api.rs
+++ b/clients/rust/src/apis/experimental_api.rs
@@ -78,18 +78,6 @@ pub enum CreateUserExternalPrincipalError {
UnknownValue(serde_json::Value),
}
-/// struct for typed errors of method [`delete_pull_request`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum DeletePullRequestError {
- Status401(models::Error),
- Status403(models::Error),
- Status404(models::Error),
- Status420(),
- DefaultResponse(models::Error),
- UnknownValue(serde_json::Value),
-}
-
/// struct for typed errors of method [`delete_user_external_principal`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
@@ -129,6 +117,7 @@ pub enum GetExternalPrincipalError {
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetPullRequestError {
+ Status400(models::Error),
Status401(models::Error),
Status404(models::Error),
Status420(),
@@ -185,6 +174,7 @@ pub enum StsLoginError {
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UpdatePullRequestError {
+ Status400(models::Error),
Status401(models::Error),
Status403(models::Error),
Status404(models::Error),
@@ -373,39 +363,6 @@ pub async fn create_user_external_principal(configuration: &configuration::Confi
}
}
-pub async fn delete_pull_request(configuration: &configuration::Configuration, repository: &str, pull_request: &str) -> Result<(), Error> {
- let local_var_configuration = configuration;
-
- let local_var_client = &local_var_configuration.client;
-
- let local_var_uri_str = format!("{}/repositories/{repository}/pulls/{pull_request}", local_var_configuration.base_path, repository=crate::apis::urlencode(repository), pull_request=crate::apis::urlencode(pull_request));
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
-
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
- }
- if let Some(ref local_var_auth_conf) = local_var_configuration.basic_auth {
- local_var_req_builder = local_var_req_builder.basic_auth(local_var_auth_conf.0.to_owned(), local_var_auth_conf.1.to_owned());
- };
- if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
- local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
- };
-
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req).await?;
-
- let local_var_status = local_var_resp.status();
- let local_var_content = local_var_resp.text().await?;
-
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
- Ok(())
- } else {
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
- }
-}
-
pub async fn delete_user_external_principal(configuration: &configuration::Configuration, user_id: &str, principal_id: &str) -> Result<(), Error> {
let local_var_configuration = configuration;
diff --git a/clients/rust/src/apis/pulls_api.rs b/clients/rust/src/apis/pulls_api.rs
index 77d07981b4c..89ef73013e1 100644
--- a/clients/rust/src/apis/pulls_api.rs
+++ b/clients/rust/src/apis/pulls_api.rs
@@ -29,22 +29,11 @@ pub enum CreatePullRequestError {
UnknownValue(serde_json::Value),
}
-/// struct for typed errors of method [`delete_pull_request`]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum DeletePullRequestError {
- Status401(models::Error),
- Status403(models::Error),
- Status404(models::Error),
- Status420(),
- DefaultResponse(models::Error),
- UnknownValue(serde_json::Value),
-}
-
/// struct for typed errors of method [`get_pull_request`]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum GetPullRequestError {
+ Status400(models::Error),
Status401(models::Error),
Status404(models::Error),
Status420(),
@@ -67,6 +56,7 @@ pub enum ListPullRequestsError {
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum UpdatePullRequestError {
+ Status400(models::Error),
Status401(models::Error),
Status403(models::Error),
Status404(models::Error),
@@ -110,39 +100,6 @@ pub async fn create_pull_request(configuration: &configuration::Configuration, r
}
}
-pub async fn delete_pull_request(configuration: &configuration::Configuration, repository: &str, pull_request: &str) -> Result<(), Error> {
- let local_var_configuration = configuration;
-
- let local_var_client = &local_var_configuration.client;
-
- let local_var_uri_str = format!("{}/repositories/{repository}/pulls/{pull_request}", local_var_configuration.base_path, repository=crate::apis::urlencode(repository), pull_request=crate::apis::urlencode(pull_request));
- let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
-
- if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
- local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
- }
- if let Some(ref local_var_auth_conf) = local_var_configuration.basic_auth {
- local_var_req_builder = local_var_req_builder.basic_auth(local_var_auth_conf.0.to_owned(), local_var_auth_conf.1.to_owned());
- };
- if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
- local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
- };
-
- let local_var_req = local_var_req_builder.build()?;
- let local_var_resp = local_var_client.execute(local_var_req).await?;
-
- let local_var_status = local_var_resp.status();
- let local_var_content = local_var_resp.text().await?;
-
- if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
- Ok(())
- } else {
- let local_var_entity: Option = serde_json::from_str(&local_var_content).ok();
- let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
- Err(Error::ResponseError(local_var_error))
- }
-}
-
pub async fn get_pull_request(configuration: &configuration::Configuration, repository: &str, pull_request: &str) -> Result> {
let local_var_configuration = configuration;
diff --git a/docs/assets/js/swagger.yml b/docs/assets/js/swagger.yml
index 5328679b8ff..7c6561c25ce 100644
--- a/docs/assets/js/swagger.yml
+++ b/docs/assets/js/swagger.yml
@@ -5754,6 +5754,8 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/PullRequest"
+ 400:
+ $ref: "#/components/responses/ValidationError"
401:
$ref: "#/components/responses/Unauthorized"
404:
@@ -5762,25 +5764,6 @@ paths:
description: too many requests
default:
$ref: "#/components/responses/ServerError"
- delete:
- tags:
- - pulls
- - experimental
- operationId: deletePullRequest
- summary: delete pull request
- responses:
- 204:
- description: pull request deleted successfully
- 401:
- $ref: "#/components/responses/Unauthorized"
- 403:
- $ref: "#/components/responses/Forbidden"
- 404:
- $ref: "#/components/responses/NotFound"
- 420:
- description: too many requests
- default:
- $ref: "#/components/responses/ServerError"
patch:
tags:
- pulls
@@ -5794,8 +5777,10 @@ paths:
schema:
$ref: "#/components/schemas/PullRequestBasic"
responses:
- 204:
- description: pull request deleted successfully
+ 200:
+ description: pull request updated successfully
+ 400:
+ $ref: "#/components/responses/ValidationError"
401:
$ref: "#/components/responses/Unauthorized"
403:
diff --git a/pkg/api/controller.go b/pkg/api/controller.go
index 7fc85142372..88188a7ce92 100644
--- a/pkg/api/controller.go
+++ b/pkg/api/controller.go
@@ -2709,7 +2709,8 @@ func (c *Controller) handleAPIErrorCallback(ctx context.Context, w http.Response
errors.Is(err, block.ErrInvalidAddress),
errors.Is(err, block.ErrOperationNotSupported),
errors.Is(err, authentication.ErrInvalidRequest),
- errors.Is(err, graveler.ErrSameBranch):
+ errors.Is(err, graveler.ErrSameBranch),
+ errors.Is(err, graveler.ErrInvalidPullRequestStatus):
log.Debug("Bad request")
cb(w, r, http.StatusBadRequest, err)
@@ -5255,10 +5256,6 @@ func (c *Controller) CreatePullRequest(w http.ResponseWriter, r *http.Request, b
_, _ = io.WriteString(w, pid)
}
-func (c *Controller) DeletePullRequest(w http.ResponseWriter, r *http.Request, repository string, pullRequestID string) {
- writeResponse(w, r, http.StatusNotImplemented, nil)
-}
-
func (c *Controller) GetPullRequest(w http.ResponseWriter, r *http.Request, repository string, pullRequestID string) {
if !c.authorize(w, r, permissions.Node{
Permission: permissions.Permission{
@@ -5277,7 +5274,7 @@ func (c *Controller) GetPullRequest(w http.ResponseWriter, r *http.Request, repo
response := apigen.PullRequest{
PullRequestBasic: apigen.PullRequestBasic{
Description: swag.String(pr.Description),
- Status: swag.String(pr.Status.String()),
+ Status: swag.String(strings.ToLower(pr.Status.String())),
Title: swag.String(pr.Title),
},
Author: pr.Author,
@@ -5291,7 +5288,26 @@ func (c *Controller) GetPullRequest(w http.ResponseWriter, r *http.Request, repo
}
func (c *Controller) UpdatePullRequest(w http.ResponseWriter, r *http.Request, body apigen.UpdatePullRequestJSONRequestBody, repository string, pullRequestID string) {
- writeResponse(w, r, http.StatusNotImplemented, nil)
+ if !c.authorize(w, r, permissions.Node{
+ Permission: permissions.Permission{
+ Action: permissions.WritePullReqeustAction,
+ Resource: permissions.RepoArn(repository),
+ },
+ }) {
+ return
+ }
+ ctx := r.Context()
+ c.LogAction(ctx, "update_pull_request", r, repository, "", "")
+
+ err := c.Catalog.UpdatePullRequest(ctx, repository, pullRequestID, &graveler.UpdatePullRequest{
+ Title: body.Title,
+ Description: body.Description,
+ Status: body.Status,
+ })
+ if c.handleAPIError(ctx, w, r, err) {
+ return
+ }
+ writeResponse(w, r, http.StatusNoContent, nil)
}
func writeError(w http.ResponseWriter, r *http.Request, code int, v interface{}) {
diff --git a/pkg/api/controller_test.go b/pkg/api/controller_test.go
index 69032c1171a..ee3d1ccbeb3 100644
--- a/pkg/api/controller_test.go
+++ b/pkg/api/controller_test.go
@@ -5350,12 +5350,33 @@ func TestController_CreatePullRequest(t *testing.T) {
require.NoError(t, err)
require.NotNil(t, userResp.JSON200)
require.Equal(t, userResp.JSON200.User.Id, getResp.JSON200.Author)
- require.Equal(t, "OPEN", swag.StringValue(getResp.JSON200.Status))
+ require.Equal(t, "open", swag.StringValue(getResp.JSON200.Status))
require.Equal(t, "", swag.StringValue(getResp.JSON200.MergedCommitId))
require.True(t, time.Now().Sub(getResp.JSON200.CreationDate) < 1*time.Minute)
})
}
+func TestController_GetPullRequest(t *testing.T) {
+ clt, deps := setupClientWithAdmin(t)
+ ctx := context.Background()
+ repo := testUniqueRepoName()
+ _, err := deps.catalog.CreateRepository(ctx, repo, onBlock(deps, repo), "main", false)
+ require.NoError(t, err)
+
+ t.Run("invalid xid", func(t *testing.T) {
+ resp, err := clt.GetPullRequestWithResponse(ctx, repo, "invalid-request-id")
+ require.NoError(t, err)
+ require.NotNil(t, resp.JSON400)
+ })
+
+ t.Run("not found", func(t *testing.T) {
+ id := xid.New()
+ resp, err := clt.GetPullRequestWithResponse(ctx, repo, id.String())
+ require.NoError(t, err)
+ require.NotNil(t, resp.JSON404, resp.Status())
+ })
+}
+
func TestController_ListPullRequestsHandler(t *testing.T) {
clt, deps := setupClientWithAdmin(t)
ctx := context.Background()
@@ -5387,7 +5408,7 @@ func TestController_ListPullRequestsHandler(t *testing.T) {
expected[i].DestinationBranch = "main"
expected[i].SourceBranch = fmt.Sprintf("src_%d", i)
expected[i].Description = fmt.Sprintf("description_%d", i)
- expected[i].Status = "OPEN"
+ expected[i].Status = "open"
branchResp, err := clt.CreateBranchWithResponse(ctx, repo, apigen.CreateBranchJSONRequestBody{
Name: expected[i].SourceBranch,
@@ -5491,6 +5512,119 @@ func TestController_ListPullRequestsHandler(t *testing.T) {
})
}
+func TestController_UpdatePullRequest(t *testing.T) {
+ clt, deps := setupClientWithAdmin(t)
+ ctx := context.Background()
+ repo := testUniqueRepoName()
+ _, err := deps.catalog.CreateRepository(ctx, repo, onBlock(deps, repo), "main", false)
+ require.NoError(t, err)
+
+ t.Run("invalid xid", func(t *testing.T) {
+ resp, err := clt.UpdatePullRequestWithResponse(ctx, repo, "invalid-request-id", apigen.UpdatePullRequestJSONRequestBody{
+ Description: swag.String("description"),
+ Status: swag.String("open"),
+ Title: swag.String("title"),
+ })
+ require.NoError(t, err)
+ require.NotNil(t, resp.JSON400)
+ })
+
+ t.Run("not found", func(t *testing.T) {
+ id := xid.New()
+ resp, err := clt.UpdatePullRequestWithResponse(ctx, repo, id.String(), apigen.UpdatePullRequestJSONRequestBody{
+ Description: swag.String("description"),
+ Status: swag.String("open"),
+ Title: swag.String("title"),
+ })
+ require.NoError(t, err)
+ require.NotNil(t, resp.JSON404, resp.Status())
+ })
+
+ t.Run("exists", func(t *testing.T) {
+ body := apigen.CreatePullRequestJSONRequestBody{
+ Description: "My description",
+ DestinationBranch: "main",
+ SourceBranch: "branch_b",
+ Title: "My title",
+ }
+ branchResp, err := clt.CreateBranchWithResponse(ctx, repo, apigen.CreateBranchJSONRequestBody{
+ Name: body.SourceBranch,
+ Source: "main",
+ })
+ require.NoError(t, err)
+ require.Equal(t, http.StatusCreated, branchResp.StatusCode())
+
+ resp, err := clt.CreatePullRequestWithResponse(ctx, repo, body)
+ require.NoError(t, err)
+ require.Equal(t, http.StatusCreated, resp.StatusCode())
+ pid := resp.Body
+
+ // Update with wrong status
+ updateResp, err := clt.UpdatePullRequestWithResponse(ctx, repo, string(pid), apigen.UpdatePullRequestJSONRequestBody{
+ Description: swag.String("description"),
+ Status: swag.String("invalid"),
+ Title: swag.String("title"),
+ })
+ require.NoError(t, err)
+ require.NotNil(t, updateResp.JSON400, updateResp.Status())
+
+ // Get pull request
+ getResp, err := clt.GetPullRequestWithResponse(ctx, repo, string(pid))
+ require.NoError(t, err)
+ require.NotNil(t, getResp.JSON200)
+
+ pr := getResp.JSON200
+
+ // Partial update
+ expected := &apigen.PullRequest{
+ PullRequestBasic: apigen.PullRequestBasic{
+ Description: swag.String("new description"),
+ Status: pr.Status,
+ Title: pr.Title,
+ },
+ Author: pr.Author,
+ CreationDate: pr.CreationDate,
+ DestinationBranch: pr.DestinationBranch,
+ Id: pr.Id,
+ MergedCommitId: pr.MergedCommitId,
+ SourceBranch: pr.SourceBranch,
+ }
+ updateResp, err = clt.UpdatePullRequestWithResponse(ctx, repo, string(pid), apigen.UpdatePullRequestJSONRequestBody{
+ Description: expected.Description,
+ })
+ require.NoError(t, err)
+ require.Equal(t, http.StatusNoContent, updateResp.StatusCode())
+
+ // Verify update
+ getResp, err = clt.GetPullRequestWithResponse(ctx, repo, string(pid))
+ require.NoError(t, err)
+ require.NotNil(t, getResp.JSON200)
+ if diff := deep.Equal(expected, getResp.JSON200); diff != nil {
+ t.Error("updated value not as expected", diff)
+ }
+
+ // Update all
+ expected.Description = swag.String("Other description")
+ expected.Title = swag.String("New title")
+ expected.Status = swag.String("closed")
+ updateResp, err = clt.UpdatePullRequestWithResponse(ctx, repo, string(pid), apigen.UpdatePullRequestJSONRequestBody{
+ Description: expected.Description,
+ Status: expected.Status,
+ Title: expected.Title,
+ })
+ require.NoError(t, err)
+ require.Equal(t, http.StatusNoContent, updateResp.StatusCode(), string(updateResp.Body))
+
+ // Verify update
+ getResp, err = clt.GetPullRequestWithResponse(ctx, repo, string(pid))
+ require.NoError(t, err)
+ require.NotNil(t, getResp.JSON200)
+ if diff := deep.Equal(expected, getResp.JSON200); diff != nil {
+ t.Error("updated value not as expected", diff)
+ }
+ })
+}
+
// pollRestoreStatus polls the restore status endpoint until the restore is complete or times out.
// test will fail in case of error.
// will return nil in case of timeout.
diff --git a/pkg/catalog/catalog.go b/pkg/catalog/catalog.go
index 899b08d80c1..9284eab5a1b 100644
--- a/pkg/catalog/catalog.go
+++ b/pkg/catalog/catalog.go
@@ -2876,7 +2876,7 @@ func (c *Catalog) checkCommitIDDuplication(ctx context.Context, repository *grav
func (c *Catalog) GetPullRequest(ctx context.Context, repositoryID string, pullRequestID string) (*graveler.PullRequest, error) {
pid := graveler.PullRequestID(pullRequestID)
if err := validator.Validate([]validator.ValidateArg{
- {Name: "name", Value: repositoryID, Fn: graveler.ValidateRepositoryID},
+ {Name: "repository", Value: repositoryID, Fn: graveler.ValidateRepositoryID},
{Name: "pullRequestID", Value: pid, Fn: graveler.ValidatePullRequestID},
}); err != nil {
return nil, err
@@ -2999,7 +2999,7 @@ func (c *Catalog) ListPullRequest(ctx context.Context, repositoryID, prefix stri
p := &PullRequest{
ID: pullID,
Title: v.Title,
- Status: v.Status.String(),
+ Status: strings.ToLower(v.Status.String()),
Description: v.Description,
Author: v.Author,
SourceBranch: v.Source,
@@ -3023,6 +3023,21 @@ func (c *Catalog) ListPullRequest(ctx context.Context, repositoryID, prefix stri
return pulls, hasMore, nil
}
+func (c *Catalog) UpdatePullRequest(ctx context.Context, repositoryID string, pullRequestID string, request *graveler.UpdatePullRequest) error {
+ pullID := graveler.PullRequestID(pullRequestID)
+ if err := validator.Validate([]validator.ValidateArg{
+ {Name: "repository", Value: repositoryID, Fn: graveler.ValidateRepositoryID},
+ {Name: "pullRequestID", Value: pullID, Fn: graveler.ValidatePullRequestID},
+ }); err != nil {
+ return err
+ }
+ repository, err := c.getRepository(ctx, repositoryID)
+ if err != nil {
+ return err
+ }
+ return c.Store.UpdatePullRequest(ctx, repository, pullID, request)
+}
+
func newCatalogEntryFromEntry(commonPrefix bool, path string, ent *Entry) DBEntry {
b := NewDBEntryBuilder().
CommonLevel(commonPrefix).
diff --git a/pkg/catalog/fake_graveler_test.go b/pkg/catalog/fake_graveler_test.go
index cd0742a84ad..22f8b28ce3b 100644
--- a/pkg/catalog/fake_graveler_test.go
+++ b/pkg/catalog/fake_graveler_test.go
@@ -314,6 +314,10 @@ func (g *FakeGraveler) ListPullRequests(context.Context, *graveler.RepositoryRec
panic("implement me")
}
+func (g *FakeGraveler) UpdatePullRequest(context.Context, *graveler.RepositoryRecord, graveler.PullRequestID, *graveler.UpdatePullRequest) error {
+ panic("implement me")
+}
+
type FakeValueIterator struct {
Data []*graveler.ValueRecord
Index int
diff --git a/pkg/graveler/errors.go b/pkg/graveler/errors.go
index 657bea3a703..0fb6ebf5134 100644
--- a/pkg/graveler/errors.go
+++ b/pkg/graveler/errors.go
@@ -63,6 +63,8 @@ var (
ErrReadOnlyRepository = wrapError(ErrUserVisible, "read-only repository")
ErrPullRequestNotFound = fmt.Errorf("pull request %w", ErrNotFound)
ErrPullRequestExists = fmt.Errorf("pull request already exists: %w", ErrNotUnique)
+ ErrInvalidPullRequestStatus = fmt.Errorf("invalid pull request status: %w", ErrInvalid)
+ ErrInvalidPullRequestID = fmt.Errorf("pull request id: %w", ErrInvalidValue)
)
// wrappedError is an error for wrapping another error while ignoring its message.
diff --git a/pkg/graveler/graveler.go b/pkg/graveler/graveler.go
index a67447bc401..08cc0c59d7a 100644
--- a/pkg/graveler/graveler.go
+++ b/pkg/graveler/graveler.go
@@ -6,6 +6,7 @@ import (
"errors"
"fmt"
"strconv"
+ "strings"
"time"
"github.com/cenkalti/backoff/v4"
@@ -288,6 +289,12 @@ type PullRequestRecord struct {
PullRequest
}
+type UpdatePullRequest struct {
+ Title *string
+ Description *string
+ Status *string
+}
+
type ImportStatus struct {
ID ImportID
Completed bool
@@ -748,6 +755,9 @@ type Collaborator interface {
// ListPullRequests lists pull requests on repository
ListPullRequests(ctx context.Context, repository *RepositoryRecord) (PullsIterator, error)
+
+ // UpdatePullRequest update pull request in the given repository
+ UpdatePullRequest(ctx context.Context, repository *RepositoryRecord, pullRequestID PullRequestID, update *UpdatePullRequest) error
}
// Internal structures used by Graveler
@@ -3390,6 +3400,39 @@ func (g *Graveler) ListPullRequests(ctx context.Context, repository *RepositoryR
return g.RefManager.ListPullRequests(ctx, repository)
}
+func PullRequestStatusFromString(s string) (PullRequestStatus, error) {
+ status, ok := PullRequestStatus_value[strings.ToUpper(s)]
+ if !ok {
+ return -1, ErrInvalidPullRequestStatus
+ }
+ return PullRequestStatus(status), nil
+}
+
+func (g *Graveler) UpdatePullRequest(ctx context.Context, repository *RepositoryRecord, pullRequestID PullRequestID, update *UpdatePullRequest) error {
+ pr, err := g.GetPullRequest(ctx, repository, pullRequestID)
+ if err != nil {
+ return err
+ }
+
+ err = g.RefManager.UpdatePullRequest(ctx, repository, pullRequestID, func(request *PullRequest) (*PullRequest, error) {
+ if update.Title != nil {
+ pr.Title = *update.Title
+ }
+ if update.Description != nil {
+ pr.Description = *update.Description
+ }
+ if update.Status != nil {
+ status, err := PullRequestStatusFromString(*update.Status)
+ if err != nil {
+ return nil, err
+ }
+ pr.Status = status
+ }
+ return pr, nil
+ })
+ return err
+}
+
func tagsToValueIterator(src TagIterator) ValueIterator {
return &tagValueIterator{
src: src,
diff --git a/pkg/graveler/mock/graveler.go b/pkg/graveler/mock/graveler.go
index 5a6bdaeaf7f..c80230b11be 100644
--- a/pkg/graveler/mock/graveler.go
+++ b/pkg/graveler/mock/graveler.go
@@ -1284,6 +1284,20 @@ func (mr *MockCollaboratorMockRecorder) ListPullRequests(ctx, repository interfa
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListPullRequests", reflect.TypeOf((*MockCollaborator)(nil).ListPullRequests), ctx, repository)
}
+// UpdatePullRequest mocks base method.
+func (m *MockCollaborator) UpdatePullRequest(ctx context.Context, repository *graveler.RepositoryRecord, pullRequestID graveler.PullRequestID, update *graveler.UpdatePullRequest) error {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "UpdatePullRequest", ctx, repository, pullRequestID, update)
+ ret0, _ := ret[0].(error)
+ return ret0
+}
+
+// UpdatePullRequest indicates an expected call of UpdatePullRequest.
+func (mr *MockCollaboratorMockRecorder) UpdatePullRequest(ctx, repository, pullRequestID, update interface{}) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdatePullRequest", reflect.TypeOf((*MockCollaborator)(nil).UpdatePullRequest), ctx, repository, pullRequestID, update)
+}
+
// MockRepositoryIterator is a mock of RepositoryIterator interface.
type MockRepositoryIterator struct {
ctrl *gomock.Controller
diff --git a/pkg/graveler/validate.go b/pkg/graveler/validate.go
index 5b16bbaa264..71ccf860210 100644
--- a/pkg/graveler/validate.go
+++ b/pkg/graveler/validate.go
@@ -88,6 +88,9 @@ func ValidatePullRequestID(v interface{}) error {
// TODO (niro): Any other validations?
_, err := xid.FromString(s.String())
+ if err != nil {
+ return ErrInvalidPullRequestID
+ }
return err
}