pdftract/xtask/Cargo.toml
jedarden 92e90af0b0 feat(pdftract-zy2jx): generate JSON Schema from Rust output types
- Add schemars dependency to pdftract-core (v1.2)
- Add JsonSchema derives to output types (ExtractionResult, PageResult, ExtractionMetadata, SpanJson, BlockJson, CellJson, RowJson, TableJson, ExtractionQuality, Receipt, ReceiptsMode)
- Create xtask/src/bin/gen_schema.rs for schema generation
- Add gen-schema command to xtask main.rs
- Generate docs/schema/v1.0/pdftract.schema.json using Draft 2020-12

Schema includes:
- $schema: "https://json-schema.org/draft/2020-12/schema"
- $defs with all output type definitions
- Proper type annotations for all fields

Closes: pdftract-zy2jx
2026-05-24 01:29:14 -04:00

26 lines
470 B
TOML

[workspace]
[package]
name = "xtask"
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
publish = false
[[bin]]
name = "xtask"
path = "src/main.rs"
[[bin]]
name = "gen_schema"
path = "src/bin/gen_schema.rs"
[dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_yaml = "0.9"
glob = "0.3"
humantime = "2.1"
lopdf = "0.34"
schemars = "1.2"
pdftract-core = { path = "../crates/pdftract-core", features = ["schemars"] }