diff --git a/openapi.yaml b/openapi.yaml index 5d63abf..21c80ad 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -5935,12 +5935,23 @@ paths: Reusable dropdown field definitions. Each has a type: - **Identity** — for Beneficiary Categories (Contact Bio Forms) - **Progress** — for Scale Indicators + + Pass `search` to find Dropdowns the way the search box on Manage Dropdowns does: it matches a Dropdown's + name, its answer choices, or a place it is used (Contact Bio Forms, Project Templates and Event Forms in your + organisations, choice trackers built on it, and the Surveys those trackers are in), ignoring case. operationId: listRatioSets security: [{tokenAuth: []}] parameters: - $ref: '#/components/parameters/Page' - $ref: '#/components/parameters/PerPage' - $ref: '#/components/parameters/LastSyncDatetime' + - name: search + in: query + required: false + description: Text to look for in the Dropdown's name, answer choices or places used + schema: + type: string + example: housing responses: "200": description: Paginated list of Ratio Sets diff --git a/server.js b/server.js index aa9fe3b..71a658d 100644 --- a/server.js +++ b/server.js @@ -4500,6 +4500,7 @@ function buildDocsPage() {
${endpointCard("GET", "/ratio_sets", "List all Ratio Sets", true, [ + { name: "search", type: "string", required: false, desc: "Finds Dropdowns whose name, answer choices or places used (Contact Bio Forms, Project Templates, Event Forms, choice trackers and their Surveys) contain this text, ignoring case" }, { name: "page", type: "integer", required: false, desc: "Page number" }, { name: "per_page", type: "integer", required: false, desc: "Records per page" } ], [{ code: "200", cls: "response-2xx", desc: "Paginated list — type: identity (Contact Bio Forms) or progress (Scale Indicators)" }])}