Skip to content

Commit fc818d9

Browse files
committed
Update to version 4.2.0 on 2026-10-29
- **BREAKING CHANGE**: list_templates returns a shorter `TemplateSummary`: a template's name, description, type, folder (`parent_folder_id`, `path`), latest published version, whether it's `ready`, and its PDF's file name, state, error and page count (`document`, a `TemplateDocumentSummary`). get_template returns its settings and the rest. - **BREAKING CHANGE**: list_submissions and list_template_submissions return `SubmissionSummary` instead of `Submission`: without signature requests and uploads, with `data` only when you pass `include_data` (as before), and with `files` only when you pass the new `include_files` (without the links to page images). get_submission returns the whole submission. - New: the template webhook events (version 4) send the whole template, as get_template returns it, without its `embed_edit_token`. They sent the settings without the rest. - New: list_submissions and list_template_submissions take a `state` filter: one state, such as `invalid_data` or `error`. - New: get_template_model_code takes `just_types`, for the types alone, without the code that converts and checks JSON (TypeScript, Ruby, Python, Java, C#, Elixir and Go: JavaScript and PHP code is the same either way). - New: create_submission, create_submission_batch and create_combined_pdf take an `Idempotency-Key` header. A request repeated with the same key within 24 hours returns the first response and creates nothing. The same key with a different request is a 422, and a repeat while the first request is still running is a 409. - New: create_template_preview and get_template_preview fill an HTML or PDF template's draft (or a published version) with your data and return PNG images of its pages, not a PDF, so you can check how it prints before you publish it or send live data. A preview creates no submission and uses no credits. Get the preview until its `state` is `processed`. Previews are watermarked like test PDFs. - New: HTML templates' `html_escape_data` setting HTML-escapes the values they print (`{{ value }}`). It's on for new templates and off for existing ones; `{{ value | raw }}` prints a value as it is. - New: `com.docspring.Webhooks.verifyWebhookSignature(payload, signatureHeader, secret)` checks a webhook request's `X-DocSpring-Signature` header. Pass it the request body exactly as it was received. It returns true or false, accepts any `v1` that matches and rejects a timestamp more than 5 minutes old (an overload with `toleranceSeconds` for another tolerance). - publish_template_version answers 409 when the draft hasn't changed since the latest published version, instead of publishing a copy of it (code `conflict`). A template's first publish always works. - Every operation documents the 429 rate limit response (with `Retry-After`), and the creates that the sync hosts wait for document their 504 (the record was saved: get it by the ID in the error). - Every optional field takes `null` in a submission's `data`, whatever its type, so model code that writes missing values as null works. A null checkbox or group of fields (an object or a list) gets its defaults, as a missing key does, and a null text, number, date, image or signature field prints blank, as before. Null in a required field is still an error. - Template and webhook names can be up to 512 characters, up from 255.
1 parent ecb7e2f commit fc818d9

69 files changed

Lines changed: 6641 additions & 2594 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.openapi-generator/FILES‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ docs/CreateSignatureRequestEventRequest.md
2828
docs/CreateSignatureRequestTokenRequest.md
2929
docs/CreateSubmissionBatchRequest.md
3030
docs/CreateSubmissionRequest.md
31+
docs/CreateTemplatePreviewRequest.md
3132
docs/CreateTemplateRequest.md
3233
docs/CreateWebhookRequest.md
3334
docs/CustomFile.md
@@ -109,6 +110,7 @@ docs/SubmissionList.md
109110
docs/SubmissionSource.md
110111
docs/SubmissionSourcePdf.md
111112
docs/SubmissionState.md
113+
docs/SubmissionSummary.md
112114
docs/SubmissionValidation.md
113115
docs/Template.md
114116
docs/TemplateActor.md
@@ -119,6 +121,7 @@ docs/TemplateDiff.md
119121
docs/TemplateDiffSummary.md
120122
docs/TemplateDocument.md
121123
docs/TemplateDocumentState.md
124+
docs/TemplateDocumentSummary.md
122125
docs/TemplateFieldChange.md
123126
docs/TemplateFieldChanges.md
124127
docs/TemplateFieldDependency.md
@@ -139,6 +142,8 @@ docs/TemplatePageFieldsStatus.md
139142
docs/TemplatePageImageStatus.md
140143
docs/TemplatePageImages.md
141144
docs/TemplatePageProcessingStatus.md
145+
docs/TemplatePreview.md
146+
docs/TemplatePreviewState.md
142147
docs/TemplateSourcePdf.md
143148
docs/TemplateSummary.md
144149
docs/TemplateSummaryList.md
@@ -199,6 +204,7 @@ src/main/java/com/docspring/CreateSignatureRequestEventRequest.java
199204
src/main/java/com/docspring/CreateSignatureRequestTokenRequest.java
200205
src/main/java/com/docspring/CreateSubmissionBatchRequest.java
201206
src/main/java/com/docspring/CreateSubmissionRequest.java
207+
src/main/java/com/docspring/CreateTemplatePreviewRequest.java
202208
src/main/java/com/docspring/CreateTemplateRequest.java
203209
src/main/java/com/docspring/CreateWebhookRequest.java
204210
src/main/java/com/docspring/CustomFile.java
@@ -289,6 +295,7 @@ src/main/java/com/docspring/SubmissionList.java
289295
src/main/java/com/docspring/SubmissionSource.java
290296
src/main/java/com/docspring/SubmissionSourcePdf.java
291297
src/main/java/com/docspring/SubmissionState.java
298+
src/main/java/com/docspring/SubmissionSummary.java
292299
src/main/java/com/docspring/SubmissionValidation.java
293300
src/main/java/com/docspring/Template.java
294301
src/main/java/com/docspring/TemplateActor.java
@@ -299,6 +306,7 @@ src/main/java/com/docspring/TemplateDiff.java
299306
src/main/java/com/docspring/TemplateDiffSummary.java
300307
src/main/java/com/docspring/TemplateDocument.java
301308
src/main/java/com/docspring/TemplateDocumentState.java
309+
src/main/java/com/docspring/TemplateDocumentSummary.java
302310
src/main/java/com/docspring/TemplateFieldChange.java
303311
src/main/java/com/docspring/TemplateFieldChanges.java
304312
src/main/java/com/docspring/TemplateFieldDependency.java
@@ -319,6 +327,8 @@ src/main/java/com/docspring/TemplatePageFieldsStatus.java
319327
src/main/java/com/docspring/TemplatePageImageStatus.java
320328
src/main/java/com/docspring/TemplatePageImages.java
321329
src/main/java/com/docspring/TemplatePageProcessingStatus.java
330+
src/main/java/com/docspring/TemplatePreview.java
331+
src/main/java/com/docspring/TemplatePreviewState.java
322332
src/main/java/com/docspring/TemplateSourcePdf.java
323333
src/main/java/com/docspring/TemplateSummary.java
324334
src/main/java/com/docspring/TemplateSummaryList.java
@@ -369,6 +379,7 @@ src/test/java/com/docspring/CreateSignatureRequestEventRequestTest.java
369379
src/test/java/com/docspring/CreateSignatureRequestTokenRequestTest.java
370380
src/test/java/com/docspring/CreateSubmissionBatchRequestTest.java
371381
src/test/java/com/docspring/CreateSubmissionRequestTest.java
382+
src/test/java/com/docspring/CreateTemplatePreviewRequestTest.java
372383
src/test/java/com/docspring/CreateTemplateRequestTest.java
373384
src/test/java/com/docspring/CreateWebhookRequestTest.java
374385
src/test/java/com/docspring/CustomFileListTest.java
@@ -449,6 +460,7 @@ src/test/java/com/docspring/SubmissionListTest.java
449460
src/test/java/com/docspring/SubmissionSourcePdfTest.java
450461
src/test/java/com/docspring/SubmissionSourceTest.java
451462
src/test/java/com/docspring/SubmissionStateTest.java
463+
src/test/java/com/docspring/SubmissionSummaryTest.java
452464
src/test/java/com/docspring/SubmissionTest.java
453465
src/test/java/com/docspring/SubmissionValidationTest.java
454466
src/test/java/com/docspring/TemplateActorTest.java
@@ -458,6 +470,7 @@ src/test/java/com/docspring/TemplateDefaultsTest.java
458470
src/test/java/com/docspring/TemplateDiffSummaryTest.java
459471
src/test/java/com/docspring/TemplateDiffTest.java
460472
src/test/java/com/docspring/TemplateDocumentStateTest.java
473+
src/test/java/com/docspring/TemplateDocumentSummaryTest.java
461474
src/test/java/com/docspring/TemplateDocumentTest.java
462475
src/test/java/com/docspring/TemplateFieldChangeTest.java
463476
src/test/java/com/docspring/TemplateFieldChangesTest.java
@@ -479,6 +492,8 @@ src/test/java/com/docspring/TemplatePageFieldsStatusTest.java
479492
src/test/java/com/docspring/TemplatePageImageStatusTest.java
480493
src/test/java/com/docspring/TemplatePageImagesTest.java
481494
src/test/java/com/docspring/TemplatePageProcessingStatusTest.java
495+
src/test/java/com/docspring/TemplatePreviewStateTest.java
496+
src/test/java/com/docspring/TemplatePreviewTest.java
482497
src/test/java/com/docspring/TemplateSourcePdfTest.java
483498
src/test/java/com/docspring/TemplateSummaryListTest.java
484499
src/test/java/com/docspring/TemplateSummaryTest.java

‎AGENTS.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,9 @@ keeps it.
6969
(https://docspring.com/docs/webhooks/overview/). A webhook created with API v2 sends events in API v2's format
7070
(version 4).
7171
- Verify each request's `X-DocSpring-Signature` header before acting on it: an HMAC-SHA256 of `{t}.{raw body}` with the
72-
webhook's signing secret, computed over the raw body exactly as received
73-
(https://docspring.com/docs/webhooks/verifying-signatures/).
72+
webhook's signing secret, where `t` must be within 5 minutes
73+
(https://docspring.com/docs/webhooks/verifying-signatures/). Pass the raw body exactly as received, not parsed JSON,
74+
to `com.docspring.Webhooks.verifyWebhookSignature(payload, signatureHeader, secret)`, which returns true or false.
7475
- No webhook is sent when a submission starts waiting for credits.
7576

7677
## Signature requests

‎CHANGELOG.md‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,41 @@
1+
### 4.2.0 [October 29, 2026]
2+
3+
- **BREAKING CHANGE**: list_templates returns a shorter `TemplateSummary`: a template's name, description, type, folder
4+
(`parent_folder_id`, `path`), latest published version, whether it's `ready`, and its PDF's file name, state, error
5+
and page count (`document`, a `TemplateDocumentSummary`). get_template returns its settings and the rest.
6+
- **BREAKING CHANGE**: list_submissions and list_template_submissions return `SubmissionSummary` instead of
7+
`Submission`: without signature requests and uploads, with `data` only when you pass `include_data` (as before), and
8+
with `files` only when you pass the new `include_files` (without the links to page images). get_submission returns the
9+
whole submission.
10+
- New: the template webhook events (version 4) send the whole template, as get_template returns it, without its
11+
`embed_edit_token`. They sent the settings without the rest.
12+
- New: list_submissions and list_template_submissions take a `state` filter: one state, such as `invalid_data` or
13+
`error`.
14+
- New: get_template_model_code takes `just_types`, for the types alone, without the code that converts and checks JSON
15+
(TypeScript, Ruby, Python, Java, C#, Elixir and Go: JavaScript and PHP code is the same either way).
16+
- New: create_submission, create_submission_batch and create_combined_pdf take an `Idempotency-Key` header. A request
17+
repeated with the same key within 24 hours returns the first response and creates nothing. The same key with a
18+
different request is a 422, and a repeat while the first request is still running is a 409.
19+
- New: create_template_preview and get_template_preview fill an HTML or PDF template's draft (or a published version)
20+
with your data and return PNG images of its pages, not a PDF, so you can check how it prints before you publish it or
21+
send live data. A preview creates no submission and uses no credits. Get the preview until its `state` is
22+
`processed`. Previews are watermarked like test PDFs.
23+
- New: HTML templates' `html_escape_data` setting HTML-escapes the values they print (`{{ value }}`). It's on for new
24+
templates and off for existing ones; `{{ value | raw }}` prints a value as it is.
25+
- New: `com.docspring.Webhooks.verifyWebhookSignature(payload, signatureHeader, secret)` checks a webhook request's
26+
`X-DocSpring-Signature` header. Pass it the request body exactly as it was received. It returns true or false, accepts
27+
any `v1` that matches and rejects a timestamp more than 5 minutes old (an overload with `toleranceSeconds` for another
28+
tolerance).
29+
- publish_template_version answers 409 when the draft hasn't changed since the latest published version, instead of
30+
publishing a copy of it (code `conflict`). A template's first publish always works.
31+
- Every operation documents the 429 rate limit response (with `Retry-After`), and the creates that the sync hosts wait
32+
for document their 504 (the record was saved: get it by the ID in the error).
33+
- Every optional field takes `null` in a submission's `data`, whatever its type, so model code that writes missing
34+
values as null works. A null checkbox or group of fields (an object or a list) gets its defaults, as a missing key
35+
does, and a null text, number, date, image or signature field prints blank, as before. Null in a required field is
36+
still an error.
37+
- Template and webhook names can be up to 512 characters, up from 255.
38+
139
### 4.1.0 [October 27, 2026]
240

341
- New: list_template_fields, add_template_fields, update_template_fields, remove_template_fields and

‎README.md‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ templates with your data, generates PDFs from HTML templates, combines PDFs and
99
The code in this repository is generated from DocSpring's OpenAPI spec ([About this SDK](#about-this-sdk)). Issues and
1010
pull requests are welcome.
1111

12-
Version 4.1.0. Requires Java 8 or later.
12+
Version 4.2.0. Requires Java 8 or later.
1313

1414
## Install and configure
1515

@@ -19,14 +19,14 @@ Version 4.1.0. Requires Java 8 or later.
1919
<dependency>
2020
<groupId>com.docspring</groupId>
2121
<artifactId>DocSpring</artifactId>
22-
<version>4.1.0</version>
22+
<version>4.2.0</version>
2323
</dependency>
2424
```
2525

2626
**Gradle**: add to your `build.gradle`:
2727

2828
```groovy
29-
implementation 'com.docspring:DocSpring:4.1.0'
29+
implementation 'com.docspring:DocSpring:4.2.0'
3030
```
3131

3232
Configure authentication via environment variables:
@@ -87,7 +87,7 @@ com.docspring.CreateSubmissionRequest body =
8787
.test(true);
8888

8989
try {
90-
com.docspring.Submission result = api.createSubmission(templateId, body, null, null);
90+
com.docspring.Submission result = api.createSubmission(templateId, body, null, null, null);
9191
System.out.println(result);
9292
} catch (com.docspring.ApiException ex) {
9393
System.out.println(ex);
@@ -119,6 +119,7 @@ Java code for every method.
119119
| [`createSubmission`](https://github.com/DocSpring/docspring-java/blob/main/docs/Client.md#createsubmission) | Generate a PDF |
120120
| [`createSubmissionBatch`](https://github.com/DocSpring/docspring-java/blob/main/docs/Client.md#createsubmissionbatch) | Generate PDFs in a batch |
121121
| [`createTemplate`](https://github.com/DocSpring/docspring-java/blob/main/docs/Client.md#createtemplate) | Create a template |
122+
| [`createTemplatePreview`](https://github.com/DocSpring/docspring-java/blob/main/docs/Client.md#createtemplatepreview) | Preview a template with data |
122123
| [`createWebhook`](https://github.com/DocSpring/docspring-java/blob/main/docs/Client.md#createwebhook) | Create a webhook |
123124
| [`deleteCustomFile`](https://github.com/DocSpring/docspring-java/blob/main/docs/Client.md#deletecustomfile) | Delete a custom file |
124125
| [`deleteFolder`](https://github.com/DocSpring/docspring-java/blob/main/docs/Client.md#deletefolder) | Delete a folder |
@@ -139,6 +140,7 @@ Java code for every method.
139140
| [`getTemplateDiff`](https://github.com/DocSpring/docspring-java/blob/main/docs/Client.md#gettemplatediff) | Compare a version of a template with the one before it |
140141
| [`getTemplateModelCode`](https://github.com/DocSpring/docspring-java/blob/main/docs/Client.md#gettemplatemodelcode) | Generate typed code for a template's submission data |
141142
| [`getTemplatePageImages`](https://github.com/DocSpring/docspring-java/blob/main/docs/Client.md#gettemplatepageimages) | Get images of a template's pages |
143+
| [`getTemplatePreview`](https://github.com/DocSpring/docspring-java/blob/main/docs/Client.md#gettemplatepreview) | Get a template preview |
142144
| [`getTemplateSchema`](https://github.com/DocSpring/docspring-java/blob/main/docs/Client.md#gettemplateschema) | Get the JSON Schema of a template's submission data |
143145
| [`getWebhook`](https://github.com/DocSpring/docspring-java/blob/main/docs/Client.md#getwebhook) | Get a webhook |
144146
| [`listCombinedPdfs`](https://github.com/DocSpring/docspring-java/blob/main/docs/Client.md#listcombinedpdfs) | List combined PDFs |
@@ -197,6 +199,7 @@ The fork changes the Java generator:
197199
On top of the generated code, we add:
198200

199201
- A client constructor that reads your credentials, region and host from the environment.
202+
- `com.docspring.Webhooks.verifyWebhookSignature(payload, signatureHeader, secret)` checks a webhook request's `X-DocSpring-Signature` header, with overloads that take a tolerance and the current time in seconds.
200203

201204
Each release regenerates every file, so a change made only here would be lost in the next one. Issues and pull
202205
requests are welcome all the same: [open an issue](https://github.com/DocSpring/docspring-java/issues) or a pull request, or email

0 commit comments

Comments
 (0)