Skip to content

Fix hreflang validation for links and assets - #4

Merged
m-mohr merged 4 commits into
stac-extensions:mainfrom
yharby:fix/hreflang-schema-validation
Aug 27, 2026
Merged

Fix hreflang validation for links and assets#4
m-mohr merged 4 commits into
stac-extensions:mainfrom
yharby:fix/hreflang-schema-validation

Conversation

@yharby

@yharby yharby commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Replace two $refs keys with $ref.
  • Add tests for invalid hreflang values on links and assets.
  • Update all examples to STAC 1.1.0.
  • Add the fix to the changelog.

Commit split

  • 59d05d5 changes only json-schema/schema.json. It is ready to cherry-pick into v1.0.0.
  • 284ed6d adds the tests, STAC 1.1.0 examples, package change, and changelog entry.

Why

JSON Schema ignores the unknown $refs keyword.

An invalid hreflang value could pass validation on a link or asset.

Fixes #3.

Verification

The command used the six examples in examples/. It fetched the official STAC 1.1.0 schemas.

$ npm test
Files: 6
Valid: 6
Invalid: 0
Malformed: 0
Invalid hreflang values are rejected on links and assets.

@yharby
yharby marked this pull request as ready for review August 25, 2026 05:52
@m-mohr

m-mohr commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Thanks, I'd like to cherry-pick the JSON Schema changes into 1.0.0 so that we can fix the schema without requiring a new release. And then merge the rest in.

@m-mohr m-mohr self-assigned this Aug 25, 2026
@yharby
yharby force-pushed the fix/hreflang-schema-validation branch from 31c7144 to 284ed6d Compare August 25, 2026 05:59
@yharby

yharby commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

Thanks, Can you check now ?

@m-mohr
m-mohr merged commit a376f4e into stac-extensions:main Aug 27, 2026
@m-mohr

m-mohr commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Thanks, cherry-picked the schema into 1.0.0 release so that we don't need to rerelease just for that. Otherwise, merged everything else in for the next release.

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.

Fix $refs typos that skip hreflang validation

2 participants