ckanext-openapi
ckanext-openapi is an extension for CKAN that integrates and displays OpenAPI endpoints directly in the CKAN catalog. Supporting both OpenAPI 2.0.0 and OpenAPI 3.0.0 specifications.
Overview
In terms of CKAN features, this extension offers:
- Provides an OpenAPI/Swagger UI interface for custom APIs, e.g: CKAN and Datastore.
- Allows configuration of custom OpenAPI endpoints.
- Supports multi-language documentation fields.
- Integrates OpenAPI in CKAN Open Data portal.
Requirements
Compatibility
Compatibility with core CKAN versions:
| CKAN version |
Compatibility |
| 2.8 |
❌ No (>= Python 3) |
| 2.9 |
❌ No (>= CKAN 2.10) |
| 2.10 |
✅ Yes |
| 2.11 |
✅ Yes |
Dependencies
This plugin needs the following plugins to work properly:
# Install latest stable release of ckanext-scheming
pip install -e git+https://github.com/ckan/ckanext-scheming.git@release-3.0.0#egg=ckanext-scheming
Running the Tests
To run the tests:
pytest --ckan-ini=test.ini ckanext/openapi/tests
Run tests quickly with Docker Compose
This repository includes a Docker Compose configuration to simplify running tests. The CKAN image is built using the Dockerfile located in the docker/ directory.
docker compose up --build
Releases
To create a new release, follow these steps:
- Determine new release number based on the rules of semantic versioning
- Update the CHANGELOG, especially the link for the “Unreleased” section
- Update the version number in
setup.py
- Create a new release on GitHub and add the CHANGELOG of this release as release notes
Documentation
Read the documentation for a full user guide: https://mjanez.github.io/ckanext-openapi
License
This material is copyright (c) Open Knowledge.
It is open and licensed under the GNU Affero General Public License (AGPL) v3.0.