chore(docs): update endpoints to use POST requests

This commit is contained in:
rzmk 2025-10-22 06:48:42 -04:00
parent 0eaf2eb000
commit ebbe179fbf
3 changed files with 40 additions and 36 deletions

View file

@ -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.
<APIPage document={"./lib/openapi.yml"} operations={[{"path":"/package_search","method":"get"}]} webhooks={[]} hasHead={false} />
<APIPage document={"./lib/openapi.yml"} operations={[{"path":"/package_search","method":"post"}]} webhooks={[]} hasHead={false} />

View file

@ -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.
<APIPage document={"./lib/openapi.yml"} operations={[{"path":"/package_show","method":"get"}]} webhooks={[]} hasHead={false} />
<APIPage document={"./lib/openapi.yml"} operations={[{"path":"/package_show","method":"post"}]} webhooks={[]} hasHead={false} />

View file

@ -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
}