Notes for AI coding agents working with the DocSpring Java SDK (com.docspring:DocSpring), in this repository or
as a dependency of an app.
Every file here is generated from DocSpring's OpenAPI spec by DocSpring's fork of OpenAPI Generator, and each release replaces all of it. Don't edit it or open pull requests that change it, and don't patch an installed copy: the next release overwrites the change. Report bugs at https://github.com/DocSpring/docspring-java/issues or to support@docspring.com, and DocSpring fixes them in the generator.
- README.md: install, configuration, an example and how errors and API changes are handled.
- docs/Client.md: every method, with its parameters and return type.
- docs/: every model and its fields.
- https://docspring.com/docs/llms.txt: DocSpring's documentation for LLMs (
llms-small.txt,llms-full.txt). - https://docspring.com/docs/api/: the API reference, with Java code for every method.
- https://docspring.com/api-docs/v1/openapi.json: the OpenAPI spec this SDK is generated from.
- Credentials come from
DOCSPRING_TOKEN_IDandDOCSPRING_TOKEN_SECRET. Keep them in the environment or a secret store, never in code. Accounts in the EU region also needDOCSPRING_REGION=EU. - Template IDs look like
tpl_...and submission IDs likesub_.... - Pass
test: truewhen you generate PDFs during development: test PDFs are free and watermarked. - Generating a PDF waits for it, for up to 95 seconds. For many PDFs or slow templates, set
waitto false and use webhooks or check the submission later (https://docspring.com/docs/api-guide/synchronous-requests/). - Errors: Methods throw
com.docspring.ApiExceptionfor an error response, with the HTTP status ingetCode()and the body ingetResponseBody(). - Responses can be newer than this SDK, because DocSpring adds fields and enum values to API v1 without a new
version. The model keeps a response field added to the API after this release in its additional properties (
getAdditionalProperties()). An enum value added to the API after this release comes back asUNKNOWN_DEFAULT_OPEN_API, so give eachswitchover an enum a case or default for it.