stac-validate 0.6.8

json-schema validation for the Rust implementation of the STAC specification
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use rstest::rstest;
use stac::{Migrate, Value, Version};
use stac_validate::Validate;
use std::path::PathBuf;

#[rstest]
#[tokio::test]
async fn v1_0_0_to_v1_1_0(#[files("../../spec-examples/v1.0.0/**/*.json")] path: PathBuf) {
    let value: Value = stac::read(path.to_str().unwrap()).unwrap();
    let value = value.migrate(&Version::v1_1_0).unwrap();
    value.validate().await.unwrap();
}