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

Be explicit about behavior of implementations with regard to default values in the schema #251

Open
perrygreenfield opened this issue Jun 19, 2020 · 0 comments

Comments

@perrygreenfield
Copy link
Contributor

The ASDF Standard doesn't provide explicit guidance on how the "default" annotation in the schemas is to be used. The Python library currently adds default values to the tree where missing on read, and removes values that match the default on write. This feature seems intended to reduce file size when many objects with default values are present. There are some downsides: the files when viewed independent of the schemas seem to be missing some of their data (including required fields), and it's not always possible to identify a single default value for objects that are validated against multiple schemas using combiners.

Regardless of which behavior we settle on, we should consider adding language to the ASDF Standard that defines how default values are to be treated.

We talked about the option of removing defaults from the ASDF standard. Can we give that serious consideration? This is linked a bit to the previous item regarding null values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant