Repository navigation
PDFCLOUD-6578 Add Markdown inline output - #64
Draft
datalogics-tsmith wants to merge 3 commits into
Draft
datalogics-tsmith wants to merge 3 commits into
datalogics-tsmith wants to merge 3 commits into
Conversation
- Add separate synchronous and asynchronous helpers for inline Markdown. - Split request validation by output mode and export the inline response. - Preserve the existing downloadable file workflow and clarify its docs. Assisted-by: Codex
- Assert inline payload serialization, request customization, and timeouts. - Verify MIME and single-resource validation before transport execution. - Add deterministic live inline output and server-side negative cases. Assisted-by: Codex
- Add a standalone example for inline and downloadable Markdown results. - List the workflow and distinguish the two public helpers in the API guide. Assisted-by: Codex
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PDFCLOUD-6578
Why this change
The Markdown conversion service supports both inline JSON content and downloadable file output, but the Python client only exposed the file-oriented workflow. Users need a typed inline option for retrieval and indexing workflows without weakening the existing file response contract.
What changed (high level)
A separate
convert_to_markdown_inlinehelper now exposes the inline workflow for synchronous and asynchronous clients. Shared payload fields live in a common base model, while narrow inline and file payload models keep each response shape statically clear. The existingconvert_to_markdownhelper remains the downloadable-file API.The public inline response model requires the generated Markdown and input resource ID. Documentation and a standalone example demonstrate both workflows.
Behavior changes
Callers can now receive generated Markdown directly as
ConvertToMarkdownResponse. Page selection, page-break comments, request customization, and timeout overrides work through both transports. Invalid MIME types, multiple resources, or incompatible output modes fail during local payload validation before a request is sent.This change is additive and does not alter the existing file-output method signature or return type.
Validation
uv run pre-commit run --files ...uv run basedpyrightuv run mkdocs build --strictThe API-backed live suite and runnable example could not be executed locally because
PDFREST_API_KEYwas unavailable. The main-repository draft PR is expected to run those checks in CI.Risks and follow-ups
This draft is stacked directly on #63 and must remain a draft until #63 and all preceding pull requests in the stack are merged. Once the stack lands, GitHub can retarget this pull request to
mainautomatically or the base can be updated manually if needed.The live suite asserts deterministic inline content, page-break comments, file output, and server-side rejection through both transports. No migration or breaking API change is required.