[ckan-dev] JSON Metadata Schema file for CKAN?

Aaron Couch acinternets at gmail.com
Tue Jul 8 18:11:05 UTC 2014


"If you're asking for a description of every field that you see now in
datasets like the one you've linked, that's something that we really
need."

This is what I'm looking for.

"I was hoping to add descriptions of the fields to the
package_create and resource_create API documentation, including the
read-only values that are generated by CKAN and mixed in with the user
data returned. Hopefully soon."

Great to hear. In the meantime I've made a JSON schema:
https://github.com/NuCivic/open_data_schema_map/blob/master/modules/open_data_schema_ckan/data/schema_ckan.json
I'll check back and add descriptions when the CKAN code has been updated.

I don't think I'd be much use to your documentation effort but if there is
something I can do I'd be glad to assist.

Thanks for your help.

-Aaron

best,

-Aaron



On Mon, Jul 7, 2014 at 5:07 PM, Ian Ward <ian at excess.org> wrote:

> On Mon, Jul 7, 2014 at 4:25 PM, Aaron Couch <acinternets at gmail.com> wrote:
> > hi Ian:
> >
> > Thanks for the quick response. That link looks helpful, but it is
> missing a
> > lot of the fields that are in many CKAN implementations. For example:
> > http://demo.ckan.org/api/3/action/package_show?id=adur_district_spending
>
> Yes, that's right. ckanext-scheming is about customizing the fields
> that users see in the form, validation and when viewing datasets on
> the web page, so just those fields were included in the file I linked
> to.
>
> > Is there a place, maybe in CKAN core or a next repo, that has a full or
> > fuller list of fields that I could create a JSON schema from?  This is
> the
> > closest I could find in the code:
> >
> https://github.com/ckan/ckan/blob/3f886918bcd09ae29fda216841f9d318c9ff6c87/ckan/logic/schema.py#L132
>
> Yes, the ckan.logic.schema is the place to find the default lists of
> validators and converters for each dataset and resource field. As
> you've seen any CKAN instance can override those validators and add
> their own fields, though. And when no custom schema is applied users
> can also add arbitrary string values to resources and as many extras
> as they like to the dataset.
>
> Extensions like the datastore depend on being able to add extra
> strings to hold their custom information.
>
> Are you asking for a way to query a particular CKAN instance to find
> out what fields it supports and what validation rules are applied?
> There isn't anything like that at the moment, but that's part of what
> I hope ckanext-scheming's data structure will provide: a data
> structure that describes the most important information for every
> field for each dataset type supported by a CKAN instance.
>
> If you're asking for a description of every field that you see now in
> datasets like the one you've linked, that's something that we really
> need. I was hoping to add descriptions of the fields to the
> package_create and resource_create API documentation, including the
> read-only values that are generated by CKAN and mixed in with the user
> data returned. Hopefully soon.
>
> Ian
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20140708/1ec54d63/attachment-0003.html>


More information about the ckan-dev mailing list