diff --git a/app/schemas/schemas.coffee b/app/schemas/schemas.coffee index a1a8ed366..85e35d935 100644 --- a/app/schemas/schemas.coffee +++ b/app/schemas/schemas.coffee @@ -17,7 +17,7 @@ me.shortString = (ext) -> combine({type: 'string', maxLength: 100}, ext) me.pct = (ext) -> combine({type: 'number', maximum: 1.0, minimum: 0.0}, ext) me.date = (ext) -> combine({type: ['object', 'string'], format: 'date-time'}, ext) # should just be string (Mongo ID), but sometimes mongoose turns them into objects representing those, so we are lenient -me.objectId = (ext) -> schema = combine(['object', 'string'], ext) +me.objectId = (ext) -> schema = combine({type: ['object', 'string'] }, ext) me.url = (ext) -> combine({type: 'string', format: 'url', pattern: urlPattern}, ext) PointSchema = me.object {title: "Point", description: "An {x, y} coordinate point.", format: "point2d", required: ["x", "y"]},