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

allow document.asset.copyright to be an empty string #338

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sdumetz
Copy link
Contributor

@sdumetz sdumetz commented Jan 10, 2025

Deleting document.asset.copyright in voyager-story makes for a document that fails to validate :

  1. Because document.asset.copyright has a minLengthof 1 but is optional in document.schema.json
  2. Because CVDocument.ins.copyright.value is always serialized, even when it is an empty string, which it can be since Keep Copyright notices #285 (well done, me! 😉 )

Both are reasonable, but can't work together.

At first I thought about saving copyright only when not empty but then Voyager will always revert back to the default Smithsonian notice on reload (and then will write it on next save), which is not ideal.

So I removed the minLength requirement and marked the property as required to reflect the behavior.

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

Successfully merging this pull request may close these issues.

1 participant