ckanext-apidocs
This extension documents CKAN APIs for developers who want to write code that interacts with CKAN site and its data. CKAN’s Action API is a powerful, RPC-style API that exposes all of CKAN’s core features to API clients.
This plugin provides the option of using the OpenAPI and is developed on top of the Swagger UI.
Swagger UI allows anyone — be it your development team or your end consumers — to visualize and interact with the API’s resources without having any of the implementation logic in place.
Requirements
| CKAN Version |
Compatible |
| 2.9 |
not tested |
| 2.10 |
tested |
Installation
Activate your CKAN virtual environment:
. /usr/lib/ckan/default/bin/activate
Clone the source and install:
git clone https://github.com/agmorev/ckanext-apidocs.git
cd ckanext-apidocs
pip install -e .
pip install -r requirements.txt
Add apidocs to the ckan.plugins setting.
Add link apidocs to the appropriate place on the site:
<a href="{{ h.url_for('apidocs.index') }}">{{ _('CKAN API') }}</a>
apidocs page is available on the URL https://<hostname>/api/docs/
Config Settings
The content of the API actions can be changed or added by making changes to the file swagger.json placed in /public folder.