Skip to content

feat: one JSON-LD validator shared by CLI, worker and platform - #7

Merged
matte97p merged 1 commit into
mainfrom
matte97p/align-platform
Oct 19, 2026
Merged

matte97p merged 1 commit into
mainfrom
matte97p/align-platform

Conversation

@matte97p

Copy link
Copy Markdown
Member

Same input, same result as the GeoSuite platform (owner's rule: the free tools on tools.trygeosuite.it and the platform always agree). A golden fixture in test/fixtures is shared byte for byte with the platform, which runs it too: drift fails a test on the side that changed.

  • src/validate.js is the single rule (exported as @geosuite/schema-templates/validate), used by validate.js and the worker.
  • @graph and arrays expanded, nodes inherit the wrapper @context; http/https and trailing slash contexts; @type lists; unknown @type ok; empty values count as missing; NaN rejected; parse errors in parseError.
  • test/fixtures/golden.json: 22 cases, REQUIRED_BY_TYPE and template hashes (npm run golden refreshes hashes).

Same input, same result as the GeoSuite platform (owner's rule: the free tools on tools.trygeosuite.it and the platform always agree). A golden fixture in test/fixtures is shared byte for byte with the platform, which runs it too: drift fails a test on the side that changed.

- src/validate.js is the single rule (exported as @geosuite/schema-templates/validate), used by validate.js and the worker.
- @graph and arrays expanded, nodes inherit the wrapper @context; http/https and trailing slash contexts; @type lists; unknown @type ok; empty values count as missing; NaN rejected; parse errors in parseError.
- test/fixtures/golden.json: 22 cases, REQUIRED_BY_TYPE and template hashes (npm run golden refreshes hashes).
@matte97p
matte97p merged commit ad16d4c into main Oct 19, 2026
2 checks passed
@matte97p
matte97p deleted the matte97p/align-platform branch October 19, 2026 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant