amazon-ion / ion-schema-rust

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

adds check for `name` field's Ion type and occurence in type definition #125

Closed desaikd closed 1 year ago

desaikd commented 1 year ago

Description of changes: This PR works on issues related to name field in a type definition as mentioned in https://github.com/amzn/ion-schema-rust/pull/124#discussion_r1023352762.

Issue: Type definitions described as below with multiple name fields and of non symbol type should return an error:

// invalid type definition with multiple names
type:: {
   name: my_type,
   name: new_type
}

// invalid type definition which has `name` field with non symbol type
type:: {
     name: "my_type"
}

List of changes:

Tests