blue-core-lod / bluecore_api

API for Blue Core Platform
0 stars 0 forks source link

Validation for POSTing data #20

Open sfolsom opened 1 month ago

sfolsom commented 1 month ago

Steps for POSTing a new resource:

  1. Validation, return SHACL report, e.g. missing title
  2. Deduplication test, return with existing URI if applicable
  3. Store data with new URIs
  4. POST returns reporting package, e.g. errors, new URIs, system down
sfolsom commented 1 month ago

Steps for PUTing a resource:

  1. URIs stay the same
  2. PUT changes
  3. Validation, return SHACL report, e.g. missing title
  4. Deduplication test, return with existing URI if applicable
  5. If applicable, no really, I want to make these changes
  6. Store data with new URIs
  7. Returns reporting package, e.g. errors, the URI/s, system down

(If we decide to implement deprecation the way id.loc.gov does, it will be a PUT with new assertions)

sfolsom commented 1 month ago

Steps for DELETEing a resource:

(TBD, based on deletion policy)

qjhart commented 1 week ago

From what I see, validation steps are not included on the API, are these a function of sinopia templates? I can't find any example in the template description.

If so, then the api needs to have an additional validation step that includes 1.) Validation of the records (SHACL), and 2) review of the existing corpus.

sfolsom commented 1 week ago

I think we validation needs to happen regardless of templates because we will have some data (eventually) that is created via MARC2BF conversion. Note: MARC2BF conversion is out of scope for the prototype.

Keeping the templates and validation decisions in sync will be important though.