# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Planned
- Shopware 6 integration proof-of-concept
- TYPO3 integration proof-of-concept
- Integration testing against 10+ production sites
- Additional Rich Results profiles (VideoObject, JobPosting, HowTo)
## [0.3.0] - 2026-05-24
### Added
#### CLI Binary (`schemaorg-validate`)
- `schemaorg-validate` CLI binary with `clap` derive API
- Three input modes: `--file`, `--url` (via `ureq`), `--stdin`
- Three output formats: `text` (colored), `json`, `sarif`
- Severity filtering (`--severity error|warning|info`)
- Quiet mode (`--quiet`) for CI exit-code-only usage
- `--no-color` flag (also respects `NO_COLOR` environment variable)
- Exit codes: 0 (clean), 1 (validation errors), 2 (input error)
#### SARIF 2.1.0 Output
- Full SARIF 2.1.0 compliant output for GitHub Code Scanning
- 17 rule IDs: SCHEMA001-013 (vocabulary) + PROFILE001-004 (profiles)
- Physical and logical location mapping
#### GitHub Action
- `.github/actions/schemaorg-validate/action.yml` composite action
- File glob and URL validation with SARIF upload
- Configurable profile, severity, and fail-on-warning options
#### Documentation
- User guide (`docs/guide.md`)
- Architecture overview (`docs/architecture.md`)
- CLI reference (`docs/cli.md`)
- Per-profile documentation for all 7 Google profiles + baseline (`docs/profiles/`)
- Contributing guide (`CONTRIBUTING.md`)
#### CI/CD
- GitHub Actions CI workflow with Rust test matrix
- WASM build and size gate verification
- Documentation build verification
### Changed
- Package renamed to `schemaorg-validate` for crates.io publication
- MSRV raised to 1.86 (required by `hashbrown` 0.17 / edition 2024)
- WASM size gate set to 1.5MB (actual optimized binary: 1.26MB)
## [0.2.0] - 2026-05-08
### Added
#### Vocabulary Validation (Milestone 2)
- Build-time codegen pipeline (`build.rs`) from vendored Schema.org v30.0 definitions
- 800+ type definitions with inheritance resolution (multi-parent)
- 1400+ property definitions with domain/range constraints
- Type checking: unknown, deprecated (attic), pending types
- Property checking: unknown, wrong domain, superseded properties
- Value checking: type mismatch, URL/text coercion, boolean/number, enum validation
- "Did you mean?" suggestions via Levenshtein distance (threshold <= 3)
- `ValidationResult` with severity-filtered diagnostics (Error, Warning, Info)
- `DiagnosticCode` enum for machine-readable error classification
- Property path tracking (`Product.offers[0].price`)
#### Rich Results Profiles (Milestone 3)
- `Profile` trait for platform-specific validation rules
- Profile evaluation engine with subtype inheritance via BFS
- `ProfileRegistry` with named profile groups
- 7 Google Rich Results profiles:
- **Product** — name, offers/aggregateOffer, aggregateRating/review, brand, SKU/GTIN
- **Article** — headline, image, datePublished, author, publisher (incl. NewsArticle, BlogPosting)
- **FAQPage** — mainEntity/Question/Answer (with 2024+ eligibility restriction warning)
- **BreadcrumbList** — itemListElement/ListItem with sequential position validation
- **LocalBusiness** — address, geo, openingHours (incl. all subtypes: Restaurant, Store, etc.)
- **Event** — startDate, location (Place/VirtualLocation), offers, performer
- **Recipe** — image, recipeIngredient, recipeInstructions/HowToStep, nutrition
- Baseline Schema.org best-practice profile
- Eligibility verdicts: `Eligible`, `WarningsOnly`, `NotEligible`, `Restricted`
#### WASM
- `wasm-bindgen` bindings (`wasm` feature flag) returning JSON strings
- npm package (`@schemaorg-rs/wasm`) with TypeScript definitions
- `scripts/build-wasm.sh` with `wasm-opt` size optimization
- JS wrapper with lazy initialization (`index.js`)
- Integration test (`wasm/test.mjs`)
### New Dependencies
- `wasm-bindgen 0.2` (optional, `wasm` feature)
- `getrandom 0.3` + `getrandom 0.2` (optional, WASM JS support)
- `serde_json 1` + `serde 1` (build-dependencies for codegen)
## [0.1.0] - 2026-04-18
### Added
#### Extraction Engine (Milestone 1)
- **JSON-LD extractor** — `<script type="application/ld+json">` parsing
- `@graph` array support (multiple top-level nodes)
- `@id` cross-reference resolution within document
- `@type` as string or array
- `@context` namespace resolution (single string and array forms)
- Nested object recursion with depth limiting (DoS protection)
- Source location tracking (line, column, byte offset of `<script>` tag)
- **Microdata extractor** — W3C Microdata to RDF algorithm
- `itemscope`/`itemprop` DOM traversal
- `itemref` for non-contiguous DOM references
- `itemid` global identifier support
- Value extraction by element type (`<meta>`, `<a>`, `<img>`, `<time>`, `<data>`, `<meter>`, etc.)
- Space-separated `itemprop` values (one element -> multiple properties)
- Deeply nested scope detection with depth limiting
- **RDFa Lite 1.1 extractor** — 5-attribute subset
- `vocab`/`typeof`/`property` core attributes
- `prefix` namespace mappings
- `resource` subject identifier override
- Context stack for nested vocabulary scopes
- **Unified API** — `extract_all()` merges results from all three formats
- **Data model** — `StructuredDataGraph` with `SchemaNode`/`SchemaValue` types
- `SchemaValue` variants: `Text`, `Url`, `Node`, `Boolean`, `Number`, `DateTime`
- `SourceFormat` tracking per node (JsonLd, Microdata, RdfaLite)
- `SourceLocation` with line, column, byte offset
- Insertion-ordered properties via `IndexMap`
- **Error handling** — `ExtractionError` (thiserror) + `ExtractionWarning` with codes
- Automatic `https://schema.org/` and `http://schema.org/` URL prefix stripping
### Feature Flags
- `extraction` (default) — HTML parsing and all three extractors
- `validation` — Schema.org vocabulary validation (requires `extraction`)
- `profiles` — Rich Results profiles (requires `validation`)
- `wasm` — WASM/wasm-bindgen support (requires `profiles`)
- `cli` — CLI binary with clap + ureq (requires `profiles`)
- `full` — extraction + validation + profiles
### Dependencies
- `scraper 0.20` — HTML parsing + CSS selector-based DOM traversal
- `serde 1` + `serde_json 1` — JSON-LD script body parsing, serialization
- `indexmap 2` — insertion-ordered property maps
- `thiserror 1` — error type derivation
[Unreleased]: https://github.com/mitrovicsinisaa/schemaorg-rs/compare/v0.3.0...HEAD
[0.3.0]: https://github.com/mitrovicsinisaa/schemaorg-rs/compare/v0.2.0...v0.3.0
[0.2.0]: https://github.com/mitrovicsinisaa/schemaorg-rs/compare/v0.1.0...v0.2.0
[0.1.0]: https://github.com/mitrovicsinisaa/schemaorg-rs/releases/tag/v0.1.0