fhir-diff 0.1.2

Semantic diff of FHIR packages and profiles with a breaking-change gate
Documentation
1
2
3
4
5
6
7
8
9
//! Print the FHIR Schema of a StructureDefinition file: `cargo run --example schema -- <file>`
fn main() {
    let path = std::env::args().nth(1).expect("file");
    let json: serde_json::Value =
        serde_json::from_str(&std::fs::read_to_string(path).unwrap()).unwrap();
    let sd: octofhir_fhirschema::StructureDefinition = serde_json::from_value(json).unwrap();
    let schema = octofhir_fhirschema::translate(sd, None).unwrap();
    println!("{}", serde_json::to_string_pretty(&schema).unwrap());
}