Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better validation error messages #190

Merged
merged 3 commits into from
Sep 22, 2023
Merged

Conversation

gadomski
Copy link
Member

@gadomski gadomski commented Sep 22, 2023

Closes

Description

Implements Validate for serde_json::Value, then only parse the JSON before starting validation.

New error message:

$ stac validate stac-cli/tests/data/collection-bad-temporal.json
Validation error at /extent/temporal: [["2020-12-11T22:38:32.125Z","2020-12-14T18:02:31.437Z"]] is not of type "object"
ERROR: validation errors

Checklist

Delete any checklist items that do not apply (e.g. if your change is minor, it may not require documentation updates).

  • Git history is linear
  • Commit messages are descriptive
  • (optional) Git commit messages follow conventional commits
  • Code is formatted (cargo fmt)
  • cargo test
  • Changes are added to the CHANGELOG

@gadomski gadomski added this to the stac-cli-v0.0.4 milestone Sep 22, 2023
@gadomski gadomski enabled auto-merge (rebase) September 22, 2023 21:25
@gadomski gadomski merged commit 57e5dfc into main Sep 22, 2023
7 checks passed
@gadomski gadomski deleted the issues/185-validation-errors branch September 22, 2023 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[crate] cli stac-cli
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bad error message in validation
1 participant