[ckan-dev] JSON schema?

David Read david.read at okfn.org
Mon Aug 22 10:51:09 UTC 2011


Florian,

There isn't a facility for this in the ckanclient script at present
because we defer validation to CKAN, providing helpful error messages
when there is a problem.

If you have a reason to add it to ckanclient, then you may well be
able to make calls to the 'navl' code in CKAN that parses this schema
and runs validation.

David

On 22 August 2011 10:31, Florian Marienfeld
<florian.marienfeld at fokus.fraunhofer.de> wrote:
> This looks good! is there an easy way to use this in a ckanclient script?
>
> On 19.08.11 17:02, Rufus Pollock wrote:
>> On 17 August 2011 16:41, Florian Marienfeld
>> <florian.marienfeld at fokus.fraunhofer.de> wrote:
>>> Hey,
>>>
>>> I was just wondering if a JSON Schema file exists for the CKAN API.
>>> while using the API, it would be nice to know if a JSON item like a
>>> package is valid.
>>
>> I'm not sure we have anything that is *exactly* what you want but we
>> do validators for the dict obtained from the json in the logic layer.
>> Specifically, here's the default package dict schema:
>>
>> <https://bitbucket.org/okfn/ckan/src/156e0a93776c/ckan/logic/schema.py#cl-70>
>>
>> Does this help?
>>
>> Rufus
>>
>> _______________________________________________
>> ckan-dev mailing list
>> ckan-dev at lists.okfn.org
>> http://lists.okfn.org/mailman/listinfo/ckan-dev
>
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
>




More information about the ckan-dev mailing list