-
Notifications
You must be signed in to change notification settings - Fork 0
chore: Update JSON schema to allow text and URL in publications #145
chore: Update JSON schema to allow text and URL in publications #145
Conversation
It is an improvement but still does not solve all the invalid json problems:
I have ported the changes over to my branch in the Rust rewrite. |
"type": "object", | ||
"description": "A publication.", | ||
"properties": { | ||
"text": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The url type already contains an optional text
property....
The way you have defined the properties structure these are valid examples of a publication object:
{
"text" : "Only text is mandatory"
}
{
"text" : "Only text is mandatory",
"url" : [
{
"url" : "https://example.com/1",
"text" : "Url may contain a text, the publication url is a list"
},
{
"url" : "https://example.com/@"
}
]
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this intended like so?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, this is intended:
for URLs the text is what is supposed to be displayed within the <a>
tag.
for publications, we do not intend to make the entire publication text the <a>
tag, only parts of it.
This is conventional in citing in humanities.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Random example I got from the internet:
Alonso, Alvaro, and Julio A. Camargo. "Toxicity of Nitrite to Three Species of Freshwater Invertebrates." Environmental Toxicology, vol. 21, no. 1, 3 Feb. 2006, pp. 90-94. Wiley Online Library, doi: 10.1002/tox.20155.
Alonso, Alvaro, and Julio A. Camargo. "Toxicity of Nitrite to Three Species of Freshwater Invertebrates." Environmental Toxicology, vol. 21, no. 1, 3 Feb. 2006, pp. 90-94. Wiley Online Library, doi: [10.1002/tox.20155](https://doi.org/10.1002/tox.20155).
This would roughly map to
"publications": [
{
"text": "Alonso, Alvaro, and Julio A. Camargo. \"Toxicity of Nitrite to Three Species of Freshwater Invertebrates.\" Environmental Toxicology, vol. 21, no. 1, 3 Feb. 2006, pp. 90-94. Wiley Online Library, doi:"
"url": [
"text": "10.1002/tox.20155"
"url": "https://doi.org/10.1002/tox.20155"
]
}
]
Does that make sense now?
I am aware of that, but I want to keep the PR to the point: Data changes and schema changes are different things. And as stated in other places, we will probably never have all validation issues resolved because not all projects can always deliver all data at the start. So the system must be able to handle this in some way or another. |
resolves DEV-3901