When coming from a previous version of Bedrock:
rm src/utils/schema.js
rm src/utils/search.js
rm src/utils/validation.js
rm src/utils/__tests__/schema.test.js
rm src/utils/__tests__/validation.test.js
rm -r src/utils/__fixtures__
yarn add @bedrockio/yada
yarn add @bedrockio/logger
yarn add @bedrockio/modelReplace all references to src/utils/schema.js and src/utils/validation.js to
@bedrockio/model.
In the model definitions:
- Move
searchfields into a nestedfields. - Rename
readScopestoreadAccess. - Rename
writeScopestowriteAccess. - Remove
skipValidation. - Change
Mixedtype toObject.
{
"profile" {
"type": "String",
"readScopes": "none",
"writeScopes": "none",
"skipValidation": true,
},
"object": {
"type": "Mixed"
},
"search": ["firstName", "lastName"]
}should be migrated to:
{
"profile" {
"type": "String",
"readAccess": "none",
"writeAccess": "none",
},
"object": {
"type": "Object"
},
"search": {
"fields": ["firstName", "lastName"]
}
}