amazon-ion / ion-schema-rust

Rust implementation of Ion Schema
https://amazon-ion.github.io/ion-schema/sandbox
Apache License 2.0
13 stars 6 forks source link

adds changes to allow validating built-in types for TypeRef validation #116

Closed desaikd closed 2 years ago

desaikd commented 2 years ago

Description of changes: This PR works on adding changes for allowing validation for built-in types.

Example of the issue:

let schema = load_schema_from_text(r#" // No schema defined, uses built-in types"#);
// The following was only checking for types defined within schema but not built-in types
let type_to_validate = schema.get_type("int"); 
type_to_validate.validate(load_value("5"));

List of changes:

Test: