Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schema.newType() does not validate open content correctly for ISL 2.0 #232

Open
popematt opened this issue Feb 15, 2023 · 1 comment
Open
Labels
bug Something isn't working

Comments

@popematt
Copy link
Contributor

popematt commented Feb 15, 2023

A type constructed with newType() should have the same user_reserved_fields validation as the schema that it is derived from.

@Test
fun gh_issue_232_repro() {
    val iss = IonSchemaSystemBuilder.standard().build()
    val schema = iss.newSchema("\$ion_schema_2_0 type::{ name: foo, type: int }")
    assertThrows<InvalidSchemaException> { schema.newType("type::{ name: bar, description: baz }") }
}
@popematt popematt added the bug Something isn't working label Feb 15, 2023
@popematt
Copy link
Contributor Author

popematt commented Mar 6, 2023

This was fixed serendipitously as part of #238. The only action required is to add the repro test case as a regression test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant