Skip to content

Latest commit

 

History

History
33 lines (26 loc) · 2.42 KB

AGENTS.md

File metadata and controls

33 lines (26 loc) · 2.42 KB

AGENTS.md

Notes for AI coding agents working with the DocSpring Java SDK (com.docspring:DocSpring), in this repository or as a dependency of an app.

This code is generated

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.

Where to look

Using it in an app

  • Credentials come from DOCSPRING_TOKEN_ID and DOCSPRING_TOKEN_SECRET. Keep them in the environment or a secret store, never in code. Accounts in the EU region also need DOCSPRING_REGION=EU.
  • Template IDs look like tpl_... and submission IDs like sub_....
  • Pass test: true when 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 wait to false and use webhooks or check the submission later (https://docspring.com/docs/api-guide/synchronous-requests/).
  • Errors: Methods throw com.docspring.ApiException for an error response, with the HTTP status in getCode() and the body in getResponseBody().
  • 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 as UNKNOWN_DEFAULT_OPEN_API, so give each switch over an enum a case or default for it.