PDFCLOUD-5549 Add Blank PDF client methods#14
Conversation
32c7f04 to
7c6dcbb
Compare
7c6dcbb to
1215e68
Compare
|
Looks like this needs a rebase, Chris. |
datalogics-kam
left a comment
There was a problem hiding this comment.
First pass...please remove code that violates SOLID, and make the suggested change to make endpoints work that don't have input_id.
327d68a to
66d0c33
Compare
datalogics-kam
left a comment
There was a problem hiding this comment.
There is still an incorrect handling of empty input ids.
66d0c33 to
c6f5205
Compare
datalogics-kam
left a comment
There was a problem hiding this comment.
Asking for
- Less complicated interface for page sizes
- Defaults surfaced.
|
I can absolutely set sensible default values here; they just wouldn't reflect expectations from the server. |
83b8dc2 to
7491bfd
Compare
I think per our recent discussions, the server does something for the values if they're not specified, and that something should be the default at the client.py level. It makes the interface clearer and easier to use. |
datalogics-kam
left a comment
There was a problem hiding this comment.
- Use TypedDict instead of tuple for custom page size. It's clearer, and types like TypedDict are designed to make names/keys obvious. (There's also NamedTuple, but we haven't used that yet, and let's not start at this moment.)
- Please surface defaults for orientation and page count all the way to the public interface, also the page size.
- Codex PR Reviewer had no findings.
- Add `blank_pdf()` sync and async methods - Ensure compatibility with Blank PDF response: - Allow PdfRestRawFileResponse.input_id to default empty so missing inputId doesn’t fail validation - When normalizing file responses, fall back to raw ids (outputId) when inputId is absent for blank-pdf - Document blank-pdf handling to keep response construction working without server-provided input ids Assisted-by: Codex
- Add full sync+async unit parametrization for blank_pdf page-size/page-orientation literals across all standard sizes. - Add explicit boundary tests for page_count (min/max success and below/above range validation) and custom dimension validation for non-positive values. Assisted-by: Codex
- Add a shared literal case matrix to live blank-pdf tests covering all accepted page_size values, both page_orientation literals, and custom dimensions. - Keep explicit invalid extra_body overrides for both transports to verify server errors on unsupported page_size values. Assisted-by: Codex
Assisted-by: Codex
Page size can be either a `str` literal or custom dimensions Assisted-by: Codex
Assisted-by: Codex
Assisted-by: Codex
7491bfd to
b4ffe7e
Compare
|
This failed the required test coverage for new code. You could probably just copy the diff-cover results form the log and ask Codex to write more testing. |
|
You can also get coverage differences locally by running the tests and looking at the coverage file. |
Assisted-by: Codex
Adds Blank PDF client support (sync + async) with validated payloads and response normalization for blank-pdf output-only responses.