basic source schema reading data in

This commit is contained in:
Lachlan Kermode
2018-12-12 17:00:22 +00:00
parent 0c54e07f8f
commit fb84d6883b
5 changed files with 47 additions and 16 deletions

View File

@@ -0,0 +1,17 @@
import Joi from 'joi';
const sourceSchema = Joi.object().keys({
id: Joi.string().required(),
path: Joi.string().required(),
type: Joi.string().allow(''),
affil_1: Joi.string().allow(''),
affil_2: Joi.string().allow(''),
url: Joi.string().allow(''),
title: Joi.string().allow(''),
parent: Joi.string(),
author: Joi.string().allow(''),
date: Joi.string(),
notes: Joi.string().allow('')
});
export default sourceSchema;