Skip to content

Commit ce74452

Browse files
Adds missing diff
1 parent d44f13a commit ce74452

39 files changed

Lines changed: 276 additions & 331 deletions
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
require_once __DIR__ . '/../vendor/autoload.php';
5+
6+
ini_set('display_errors', 1);
7+
ini_set('display_startup_errors', 1);
8+
error_reporting(E_ALL);
9+
10+
set_error_handler(function ($level, $msg) {
11+
echo "Error: {$msg}";
12+
exit(1);
13+
});
14+
15+
/**
16+
* Between openapi-generator v7.8.0 and v7.12.0 a change was made to the way
17+
* a few generators create constant names from values. The original way was
18+
* actually broken. For example "change-field-visibility" would generate a
19+
* constant name of "TYPE_FIELD_VISIBILITY", dropping the "change" part.
20+
*
21+
* The fix now generates the correct name, "TYPE_CHANGE_FIELD_VISIBILITY".
22+
* However, the fix also gets rid of the previous (incorrect) constant names,
23+
* making the fix a BC break.
24+
*
25+
* This simple script just adds the old constant names back, alongside the new
26+
* ones.
27+
*/
28+
class CopyConstants
29+
{
30+
public function run(): void
31+
{
32+
$file = __DIR__ . '/../src/main/java/com/dropbox/sign/model/SubFormFieldRuleAction.java';
33+
$contents = file_get_contents($file);
34+
35+
$constant_1 = ' CHANGE_FIELD_VISIBILITY(String.valueOf("change-field-visibility")),';
36+
$replace_1 = implode("\n", [
37+
$constant_1,
38+
' FIELD_VISIBILITY(String.valueOf("change-field-visibility")),',
39+
]);
40+
41+
$constant_2 = ' CHANGE_GROUP_VISIBILITY(String.valueOf("change-group-visibility"));';
42+
$replace_2 = implode("\n", [
43+
' CHANGE_GROUP_VISIBILITY(String.valueOf("change-group-visibility")),',
44+
' GROUP_VISIBILITY(String.valueOf("change-group-visibility"));',
45+
]);
46+
47+
$contents = str_replace(
48+
$constant_1,
49+
$replace_1,
50+
$contents,
51+
);
52+
53+
$contents = str_replace(
54+
$constant_2,
55+
$replace_2,
56+
$contents,
57+
);
58+
59+
file_put_contents($file, $contents);
60+
}
61+
}
62+
63+
$copier = new CopyConstants();
64+
$copier->run();

sdks/java-v1/openapi-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ additionalProperties:
2626
licenseUrl: https://www.opensource.org/licenses/mit-license.php
2727
useCustomTemplateCode: true
2828
licenseCopyrightYear: 2024
29+
failOnUnknownProperties: false
2930
files:
3031
dropbox-EventCallbackHelper.mustache:
3132
templateType: SupportingFiles

sdks/java-v1/run-build

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ docker run --rm \
4747
-w "${WORKING_DIR}" \
4848
perl bash ./bin/scan_for
4949

50+
printf "Adding old-style constant names ...\n"
51+
bash "${DIR}/bin/php" ./bin/copy-constants.php
52+
5053
# avoid docker messing with permissions
5154
if [[ -z "$GITHUB_ACTIONS" ]]; then
5255
chmod 644 "${DIR}/README.md"

sdks/java-v1/src/main/java/com/dropbox/sign/Configuration.java

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,13 @@
1212

1313
package com.dropbox.sign;
1414

15-
import java.util.Objects;
16-
import java.util.concurrent.atomic.AtomicReference;
17-
import java.util.function.Supplier;
18-
1915
@javax.annotation.Generated(
2016
value = "org.openapitools.codegen.languages.JavaClientCodegen",
2117
comments = "Generator version: 7.12.0")
2218
public class Configuration {
2319
public static final String VERSION = "1.8.1-dev";
2420

25-
private static final AtomicReference<ApiClient> defaultApiClient = new AtomicReference<>();
26-
private static volatile Supplier<ApiClient> apiClientFactory = ApiClient::new;
21+
private static volatile ApiClient defaultApiClient = new ApiClient();
2722

2823
/**
2924
* Get the default API client, which would be used when creating API instances without providing
@@ -32,18 +27,7 @@ public class Configuration {
3227
* @return Default API client
3328
*/
3429
public static ApiClient getDefaultApiClient() {
35-
ApiClient client = defaultApiClient.get();
36-
if (client == null) {
37-
client =
38-
defaultApiClient.updateAndGet(
39-
val -> {
40-
if (val != null) { // changed by another thread
41-
return val;
42-
}
43-
return apiClientFactory.get();
44-
});
45-
}
46-
return client;
30+
return defaultApiClient;
4731
}
4832

4933
/**
@@ -53,13 +37,6 @@ public static ApiClient getDefaultApiClient() {
5337
* @param apiClient API client
5438
*/
5539
public static void setDefaultApiClient(ApiClient apiClient) {
56-
defaultApiClient.set(apiClient);
57-
}
58-
59-
/** set the callback used to create new ApiClient objects */
60-
public static void setApiClientFactory(Supplier<ApiClient> factory) {
61-
apiClientFactory = Objects.requireNonNull(factory);
40+
defaultApiClient = apiClient;
6241
}
63-
64-
private Configuration() {}
6542
}

sdks/java-v1/src/main/java/com/dropbox/sign/JSON.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
package com.dropbox.sign;
1414

15-
import com.dropbox.sign.model.*;
1615
import com.fasterxml.jackson.annotation.*;
1716
import com.fasterxml.jackson.databind.*;
1817
import com.fasterxml.jackson.databind.json.JsonMapper;

sdks/java-v1/src/main/java/com/dropbox/sign/api/AccountApi.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public void setApiClient(ApiClient apiClient) {
5151
}
5252

5353
/**
54-
* Create Account. Creates a new Dropbox Sign Account that is associated with the specified
54+
* Create Account Creates a new Dropbox Sign Account that is associated with the specified
5555
* &#x60;email_address&#x60;.
5656
*
5757
* @param accountCreateRequest (required)
@@ -71,7 +71,7 @@ public AccountCreateResponse accountCreate(AccountCreateRequest accountCreateReq
7171
}
7272

7373
/**
74-
* Create Account. Creates a new Dropbox Sign Account that is associated with the specified
74+
* Create Account Creates a new Dropbox Sign Account that is associated with the specified
7575
* &#x60;email_address&#x60;.
7676
*
7777
* @param accountCreateRequest (required)
@@ -124,7 +124,7 @@ public ApiResponse<AccountCreateResponse> accountCreateWithHttpInfo(
124124
}
125125

126126
/**
127-
* Get Account. Returns the properties and settings of your Account.
127+
* Get Account Returns the properties and settings of your Account.
128128
*
129129
* @param accountId &#x60;account_id&#x60; or &#x60;email_address&#x60; is required. If both are
130130
* provided, the account id prevails. The ID of the Account. (optional)
@@ -185,7 +185,7 @@ public ApiResponse<AccountGetResponse> accountGetWithHttpInfo(String accountId)
185185
}
186186

187187
/**
188-
* Get Account. Returns the properties and settings of your Account.
188+
* Get Account Returns the properties and settings of your Account.
189189
*
190190
* @param accountId &#x60;account_id&#x60; or &#x60;email_address&#x60; is required. If both are
191191
* provided, the account id prevails. The ID of the Account. (optional)
@@ -235,8 +235,8 @@ public ApiResponse<AccountGetResponse> accountGetWithHttpInfo(
235235
}
236236

237237
/**
238-
* Update Account. Updates the properties and settings of your Account. Currently only allows
239-
* for updates to the [Callback URL](/api/reference/tag/Callbacks-and-Events) and locale.
238+
* Update Account Updates the properties and settings of your Account. Currently only allows for
239+
* updates to the [Callback URL](/api/reference/tag/Callbacks-and-Events) and locale.
240240
*
241241
* @param accountUpdateRequest (required)
242242
* @return AccountGetResponse
@@ -255,8 +255,8 @@ public AccountGetResponse accountUpdate(AccountUpdateRequest accountUpdateReques
255255
}
256256

257257
/**
258-
* Update Account. Updates the properties and settings of your Account. Currently only allows
259-
* for updates to the [Callback URL](/api/reference/tag/Callbacks-and-Events) and locale.
258+
* Update Account Updates the properties and settings of your Account. Currently only allows for
259+
* updates to the [Callback URL](/api/reference/tag/Callbacks-and-Events) and locale.
260260
*
261261
* @param accountUpdateRequest (required)
262262
* @return ApiResponse&lt;AccountGetResponse&gt;
@@ -308,7 +308,7 @@ public ApiResponse<AccountGetResponse> accountUpdateWithHttpInfo(
308308
}
309309

310310
/**
311-
* Verify Account. Verifies whether an Dropbox Sign Account exists for the given email address.
311+
* Verify Account Verifies whether an Dropbox Sign Account exists for the given email address.
312312
*
313313
* @param accountVerifyRequest (required)
314314
* @return AccountVerifyResponse
@@ -327,7 +327,7 @@ public AccountVerifyResponse accountVerify(AccountVerifyRequest accountVerifyReq
327327
}
328328

329329
/**
330-
* Verify Account. Verifies whether an Dropbox Sign Account exists for the given email address.
330+
* Verify Account Verifies whether an Dropbox Sign Account exists for the given email address.
331331
*
332332
* @param accountVerifyRequest (required)
333333
* @return ApiResponse&lt;AccountVerifyResponse&gt;

sdks/java-v1/src/main/java/com/dropbox/sign/api/ApiAppApi.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public void setApiClient(ApiClient apiClient) {
4949
}
5050

5151
/**
52-
* Create API App. Creates a new API App.
52+
* Create API App Creates a new API App.
5353
*
5454
* @param apiAppCreateRequest (required)
5555
* @return ApiAppGetResponse
@@ -68,7 +68,7 @@ public ApiAppGetResponse apiAppCreate(ApiAppCreateRequest apiAppCreateRequest)
6868
}
6969

7070
/**
71-
* Create API App. Creates a new API App.
71+
* Create API App Creates a new API App.
7272
*
7373
* @param apiAppCreateRequest (required)
7474
* @return ApiResponse&lt;ApiAppGetResponse&gt;
@@ -120,7 +120,7 @@ public ApiResponse<ApiAppGetResponse> apiAppCreateWithHttpInfo(
120120
}
121121

122122
/**
123-
* Delete API App. Deletes an API App. Can only be invoked for apps you own.
123+
* Delete API App Deletes an API App. Can only be invoked for apps you own.
124124
*
125125
* @param clientId The client id of the API App to delete. (required)
126126
* @throws ApiException if fails to make API call
@@ -137,7 +137,7 @@ public void apiAppDelete(String clientId) throws ApiException {
137137
}
138138

139139
/**
140-
* Delete API App. Deletes an API App. Can only be invoked for apps you own.
140+
* Delete API App Deletes an API App. Can only be invoked for apps you own.
141141
*
142142
* @param clientId The client id of the API App to delete. (required)
143143
* @return ApiResponse&lt;Void&gt;
@@ -187,7 +187,7 @@ public ApiResponse<Void> apiAppDeleteWithHttpInfo(String clientId) throws ApiExc
187187
}
188188

189189
/**
190-
* Get API App. Returns an object with information about an API App.
190+
* Get API App Returns an object with information about an API App.
191191
*
192192
* @param clientId The client id of the API App to retrieve. (required)
193193
* @return ApiAppGetResponse
@@ -205,7 +205,7 @@ public ApiAppGetResponse apiAppGet(String clientId) throws ApiException {
205205
}
206206

207207
/**
208-
* Get API App. Returns an object with information about an API App.
208+
* Get API App Returns an object with information about an API App.
209209
*
210210
* @param clientId The client id of the API App to retrieve. (required)
211211
* @return ApiResponse&lt;ApiAppGetResponse&gt;
@@ -257,7 +257,7 @@ public ApiResponse<ApiAppGetResponse> apiAppGetWithHttpInfo(String clientId)
257257
}
258258

259259
/**
260-
* List API Apps. Returns a list of API Apps that are accessible by you. If you are on a team
260+
* List API Apps Returns a list of API Apps that are accessible by you. If you are on a team
261261
* with an Admin or Developer role, this list will include apps owned by teammates.
262262
*
263263
* @param page Which page number of the API App List to return. Defaults to &#x60;1&#x60;.
@@ -318,7 +318,7 @@ public ApiResponse<ApiAppListResponse> apiAppListWithHttpInfo(Integer page)
318318
}
319319

320320
/**
321-
* List API Apps. Returns a list of API Apps that are accessible by you. If you are on a team
321+
* List API Apps Returns a list of API Apps that are accessible by you. If you are on a team
322322
* with an Admin or Developer role, this list will include apps owned by teammates.
323323
*
324324
* @param page Which page number of the API App List to return. Defaults to &#x60;1&#x60;.
@@ -375,7 +375,7 @@ public ApiResponse<ApiAppListResponse> apiAppListWithHttpInfo(Integer page, Inte
375375
}
376376

377377
/**
378-
* Update API App. Updates an existing API App. Can only be invoked for apps you own. Only the
378+
* Update API App Updates an existing API App. Can only be invoked for apps you own. Only the
379379
* fields you provide will be updated. If you wish to clear an existing optional field, provide
380380
* an empty string.
381381
*
@@ -397,7 +397,7 @@ public ApiAppGetResponse apiAppUpdate(String clientId, ApiAppUpdateRequest apiAp
397397
}
398398

399399
/**
400-
* Update API App. Updates an existing API App. Can only be invoked for apps you own. Only the
400+
* Update API App Updates an existing API App. Can only be invoked for apps you own. Only the
401401
* fields you provide will be updated. If you wish to clear an existing optional field, provide
402402
* an empty string.
403403
*

sdks/java-v1/src/main/java/com/dropbox/sign/api/BulkSendJobApi.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public void setApiClient(ApiClient apiClient) {
4747
}
4848

4949
/**
50-
* Get Bulk Send Job. Returns the status of the BulkSendJob and its SignatureRequests specified
50+
* Get Bulk Send Job Returns the status of the BulkSendJob and its SignatureRequests specified
5151
* by the &#x60;bulk_send_job_id&#x60; parameter.
5252
*
5353
* @param bulkSendJobId The id of the BulkSendJob to retrieve. (required)
@@ -112,7 +112,7 @@ public ApiResponse<BulkSendJobGetResponse> bulkSendJobGetWithHttpInfo(
112112
}
113113

114114
/**
115-
* Get Bulk Send Job. Returns the status of the BulkSendJob and its SignatureRequests specified
115+
* Get Bulk Send Job Returns the status of the BulkSendJob and its SignatureRequests specified
116116
* by the &#x60;bulk_send_job_id&#x60; parameter.
117117
*
118118
* @param bulkSendJobId The id of the BulkSendJob to retrieve. (required)
@@ -184,7 +184,7 @@ public ApiResponse<BulkSendJobGetResponse> bulkSendJobGetWithHttpInfo(
184184
}
185185

186186
/**
187-
* List Bulk Send Jobs. Returns a list of BulkSendJob that you can access.
187+
* List Bulk Send Jobs Returns a list of BulkSendJob that you can access.
188188
*
189189
* @param page Which page number of the BulkSendJob List to return. Defaults to &#x60;1&#x60;.
190190
* (optional, default to 1)
@@ -245,7 +245,7 @@ public ApiResponse<BulkSendJobListResponse> bulkSendJobListWithHttpInfo(Integer
245245
}
246246

247247
/**
248-
* List Bulk Send Jobs. Returns a list of BulkSendJob that you can access.
248+
* List Bulk Send Jobs Returns a list of BulkSendJob that you can access.
249249
*
250250
* @param page Which page number of the BulkSendJob List to return. Defaults to &#x60;1&#x60;.
251251
* (optional, default to 1)

sdks/java-v1/src/main/java/com/dropbox/sign/api/EmbeddedApi.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public void setApiClient(ApiClient apiClient) {
4646
}
4747

4848
/**
49-
* Get Embedded Template Edit URL. Retrieves an embedded object containing a template url that
49+
* Get Embedded Template Edit URL Retrieves an embedded object containing a template url that
5050
* can be opened in an iFrame. Note that only templates created via the embedded template
5151
* process are available to be edited with this endpoint.
5252
*
@@ -68,7 +68,7 @@ public EmbeddedEditUrlResponse embeddedEditUrl(
6868
}
6969

7070
/**
71-
* Get Embedded Template Edit URL. Retrieves an embedded object containing a template url that
71+
* Get Embedded Template Edit URL Retrieves an embedded object containing a template url that
7272
* can be opened in an iFrame. Note that only templates created via the embedded template
7373
* process are available to be edited with this endpoint.
7474
*
@@ -134,7 +134,7 @@ public ApiResponse<EmbeddedEditUrlResponse> embeddedEditUrlWithHttpInfo(
134134
}
135135

136136
/**
137-
* Get Embedded Sign URL. Retrieves an embedded object containing a signature url that can be
137+
* Get Embedded Sign URL Retrieves an embedded object containing a signature url that can be
138138
* opened in an iFrame. Note that templates created via the embedded template process will only
139139
* be accessible through the API.
140140
*
@@ -154,7 +154,7 @@ public EmbeddedSignUrlResponse embeddedSignUrl(String signatureId) throws ApiExc
154154
}
155155

156156
/**
157-
* Get Embedded Sign URL. Retrieves an embedded object containing a signature url that can be
157+
* Get Embedded Sign URL Retrieves an embedded object containing a signature url that can be
158158
* opened in an iFrame. Note that templates created via the embedded template process will only
159159
* be accessible through the API.
160160
*

0 commit comments

Comments
 (0)