From ebbe179fbf972226d2e7eff5474ffd8599d02f5a Mon Sep 17 00:00:00 2001
From: rzmk <30333942+rzmk@users.noreply.github.com>
Date: Wed, 22 Oct 2025 06:48:42 -0400
Subject: [PATCH] chore(docs): update endpoints to use POST requests
---
docs/content/docs/package_search.mdx | 4 +-
docs/content/docs/package_show.mdx | 4 +-
docs/lib/openapi.yml | 68 +++++++++++++++-------------
3 files changed, 40 insertions(+), 36 deletions(-)
diff --git a/docs/content/docs/package_search.mdx b/docs/content/docs/package_search.mdx
index 88179e9..def631e 100644
--- a/docs/content/docs/package_search.mdx
+++ b/docs/content/docs/package_search.mdx
@@ -2,7 +2,7 @@
title: /package_search
full: true
_openapi:
- method: GET
+ method: POST
route: /package_search
toc: []
structuredData:
@@ -15,4 +15,4 @@ _openapi:
Searches for packages satisfying a given search criteria.
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/docs/content/docs/package_show.mdx b/docs/content/docs/package_show.mdx
index 36f8744..aa0293e 100644
--- a/docs/content/docs/package_show.mdx
+++ b/docs/content/docs/package_show.mdx
@@ -2,7 +2,7 @@
title: /package_show
full: true
_openapi:
- method: GET
+ method: POST
route: /package_show
toc: []
structuredData:
@@ -15,4 +15,4 @@ _openapi:
Return the metadata of a dataset and its resources.
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/docs/lib/openapi.yml b/docs/lib/openapi.yml
index 3431d2f..4d1c78f 100644
--- a/docs/lib/openapi.yml
+++ b/docs/lib/openapi.yml
@@ -60,8 +60,7 @@ paths:
summary: /package_list
description: This endpoint lists CKAN resources.
requestBody:
- description: 'Application object that needs to be created.'
- required: true
+ required: false
content:
application/json:
schema:
@@ -102,10 +101,29 @@ paths:
Ok(())
}
'/package_show':
- get:
+ post:
operationId: /package_show
summary: /package_show
description: Return the metadata of a dataset and its resources.
+ requestBody:
+ required: true
+ content:
+ application/json:
+ schema:
+ required:
+ - id
+ type: object
+ properties:
+ id:
+ type: string
+ description: the id or name of the dataset
+ default: ""
+ use_default_schema:
+ type: boolean
+ description: use default package schema instead of a custom schema defined with an IDatasetForm plugin
+ include_plugin_data:
+ type: boolean
+ description: Include the internal plugin data object (sysadmin only)
x-codeSamples:
- lang: rust
label: Rust SDK (ckanaction) example
@@ -132,19 +150,24 @@ paths:
Ok(())
}
- parameters:
- - in: query
- name: id
- description: The ID or name of the dataset
- required: true
- schema:
- type: string
- default: ""
'/package_search':
- get:
+ post:
operationId: /package_search
summary: /package_search
description: Searches for packages satisfying a given search criteria.
+ requestBody:
+ required: false
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ q:
+ type: string
+ description: the solr query.
+ fq:
+ type: string
+ description: "any filter queries to apply. Note: `+site_id:{ckan_site_id}` is added to this string prior to the query being executed."
x-codeSamples:
- lang: rust
label: Rust SDK (ckanaction) example
@@ -170,23 +193,4 @@ paths:
println!("{result:#?}");
Ok(())
- }
- parameters:
- - in: query
- name: q
- description: the solr query
- schema:
- type: string
- default: "*:*"
- - in: query
- name: fq
- description: any filter queries to apply
- schema:
- type: string
- default: "*:*"
- - in: query
- name: include_private
- description: if `True`, private datasets will be included in the results. Only private datasets from the user's organizations will be returned and sysadmins will be returned all private datasets.
- schema:
- type: boolean
- default: false
\ No newline at end of file
+ }
\ No newline at end of file