Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A4B83E3E2 for ; Tue, 5 Feb 2013 08:52:42 +0000 (UTC) Received: (qmail 92561 invoked by uid 500); 5 Feb 2013 08:52:41 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 92418 invoked by uid 500); 5 Feb 2013 08:52:40 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 92393 invoked by uid 99); 5 Feb 2013 08:52:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Feb 2013 08:52:40 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.212.180] (HELO mail-wi0-f180.google.com) (209.85.212.180) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Feb 2013 08:52:34 +0000 Received: by mail-wi0-f180.google.com with SMTP id hi8so3433954wib.1 for ; Tue, 05 Feb 2013 00:52:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type:x-gm-message-state; bh=sCy00cPYSwwrTRYi+z8cd1uMhrD37q3B74Erc1RX8to=; b=mZtrcVmHIdY2RLODugUoahxwnhBzvVhpfQyCfuMbaLTllG+LRmgi+7wIzZOG/n6gx5 Mm0a8bI6pwRJzZD2xZRC2JuHXdqJUbPHAg9a4n6GGSLcEvF1Qi+Rk10PsMXfobe/t4OP LhBuIuht+osG98rWdKiRhY59eiOlRq4rnbl8SpNJ5gxn4MmmVO0LSeTq+LoqrllDQhEk NPA1L5g42A7YiDzLR+mqdxdwX6/zD6HQefJ6kI+tXMVxzrIzZljXzm6y0oJpOliSZ3B/ 4BrC69uXHLBMz4TTdIu3Kqu4jxvxS5720lu/1X2g969bc9USdzHvM2L697nC1huGlEaV +TtQ== MIME-Version: 1.0 X-Received: by 10.194.235.6 with SMTP id ui6mr40605777wjc.12.1360054333972; Tue, 05 Feb 2013 00:52:13 -0800 (PST) Received: by 10.216.23.129 with HTTP; Tue, 5 Feb 2013 00:52:13 -0800 (PST) Date: Tue, 5 Feb 2013 08:52:13 +0000 Message-ID: Subject: Using Json schema in validate function From: Ian Mayo To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=089e01493bd0739f2a04d4f65323 X-Gm-Message-State: ALoCoQk1ha+ejTeD7xGROEO5hXlKKBw5/mIhUrLTJlMBQkQXfIpVcolsEOR3vgAZyEevtqVJp+ZT X-Virus-Checked: Checked by ClamAV on apache.org --089e01493bd0739f2a04d4f65323 Content-Type: text/plain; charset=ISO-8859-1 I'm familiar with the use of a validate function in CouchDb, and have a js-crafted one doing a good job right now. But, I'm interested in moving to a higher-level validation, through use of a json-schema: http://json-schema.org/ I've only just become aware of the JSV validator, written in Javascript: https://github.com/garycourt/JSV Has anybody managed to use JSV in a CouchDb validate function? Are there any examples online? Personally, I think there would be great merit in providing 'native' json schema validation within CouchDb - it really seems a "grown-up" way of maintaining the quality of a document database (accepting that there are still many use cases that rely on a completely schema free design). Cheers, Ian --089e01493bd0739f2a04d4f65323--