sul-dlss / cocina-models

Cocina repository data model (implemented in Ruby)
https://sul-dlss.github.io/cocina-models/
3 stars 0 forks source link

use safe navigator for temporal encoding code mapping, and 2 small refactors #623

Closed ndushay closed 1 year ago

ndushay commented 1 year ago

NOTE: Changes to openapi.yml require updating openapi.yml for sdr-api and dor-services-app and generating models - see README.

Why was this change made? 🤔

See PR #sul-dlss/dor_indexing_app/pull/993 which is failing because specs have nils where cocina-models doesn't expect them for xform to MODS.

It adds a safe navigator so our fragments of cocina in specs can be translated without error into MODS.

This accommodates dor_indexing_app using stanford-mods code for some Argo Solr index fields (so they are the same as SearchWorks index fields). Part of #sul-dlss/dor_indexing_app/pull/992

How was this change tested? 🤨

specs.