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:
adds check for multiple name fields in a type definition
adds check for non symbol name field values
modifies doc tests to not accept string as type name
Tests
adds unit tests for both occurrence and type of name field in type definition
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:List of changes:
name
fields in a type definitionname
field valuesTests
name
field in type definition