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

Document behavior if a field / key is missing #115

Closed
birdsarah opened this issue Oct 3, 2014 · 3 comments
Closed

Document behavior if a field / key is missing #115

birdsarah opened this issue Oct 3, 2014 · 3 comments
Assignees
Labels
Focus - Documentation Includes corrections, clarifications, new guidance, and UI/UX issues
Milestone

Comments

@birdsarah
Copy link
Contributor

The behavior, will be the default json schema behavior - if its missing it'll be null or the default value: http://json-schema.org/latest/json-schema-validation.html#anchor10

@birdsarah birdsarah added the Focus - Documentation Includes corrections, clarifications, new guidance, and UI/UX issues label Oct 3, 2014
@birdsarah birdsarah added this to the Release prototype (1.0) milestone Oct 3, 2014
@practicalparticipation
Copy link
Contributor

The only default we currently have in the schema is for language, and I've suggested this should be removed, with language always explicitly set.

The draft documentation I have for this is as follows:

Basics (within Schema Reference)

If a particular field is not used within a given release or record, that field can be ommitted from the serialised data. Systems consuming the data can record a null value for this field.

To minimise file sizes publishers may omit fields they are not using.

However, publishers should note that including a field, and explicitly setting its value to ‘null’ is meaningful for the merging of releases into records, as documented in the section on merging (See draft documentation under #42).

@practicalparticipation
Copy link
Contributor

(Note - a code update to the mapper might be required so that it does not output null fields, to avoid upsetting merges if we take this approach).

@birdsarah
Copy link
Contributor Author

@practicalparticipation I'm closing this as you've got this covered in the docs you wrote up for #42.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Focus - Documentation Includes corrections, clarifications, new guidance, and UI/UX issues
Projects
None yet
Development

No branches or pull requests

2 participants