CenterForOpenScience / SHARE

SHARE is building a free, open, data set about research and scholarly activities across their life cycle.
http://share-research.readthedocs.io/en/latest/index.html
Apache License 2.0
100 stars 58 forks source link

[ENG-1986] use share.schema in share.models.validators #778

Closed aaxelb closed 3 years ago

aaxelb commented 3 years ago

what

trim another important dependency on the ShareObject family -- refactor JSONLDValidator in share.models.validators to get schema info from share.schema (new in #776) instead of from the ShareObject model classes (which will soon be deleted)

deviations

because share.schema has all fields defined on the concrete type (see #776), validation is now slightly looser in some cases -- attributes previously only valid for one subtype (e.g. Person.given_name) are now valid for all subtypes of that concrete type (e.g. Organization, Institution, Consortium, Department, and Agent may now also have a given_name)

i admit this is a little weird, but it probably will not matter.

jira

ENG-1986