diff --git a/src/main/openapi/discovery.yaml b/src/main/openapi/discovery.yaml index 3f43dc1..49a8a00 100644 --- a/src/main/openapi/discovery.yaml +++ b/src/main/openapi/discovery.yaml @@ -25,49 +25,16 @@ servers: description: Development server paths: /api/v1/datasets/search: - get: + post: summary: Searches for packages based on criteria operationId: dataset_search tags: - "dataset-query" - parameters: - - name: q - in: query - description: Solr search query - required: false - schema: - type: string - default: "*:*" - - name: fq - in: query - description: Filter query to apply - required: false - schema: - type: string - - name: sort - in: query - description: Sorting of search results - required: false - schema: - type: string - default: "score desc, metadata_modified desc" - - name: rows - in: query - description: Max number of rows to return - required: false - schema: - type: integer - default: 10 - minimum: 0 - maximum: 1000 - - name: start - in: query - description: Offset in the complete result set - required: false - schema: - type: integer - default: 0 - minimum: 0 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/DatasetSearchQuery" responses: "200": description: A list of datasets matching the search criteria @@ -125,6 +92,44 @@ components: scopes: read:datasets: read datasets schemas: + DatasetSearchQuery: + type: object + properties: + query: + type: string + title: Solr search query + facets: + type: array + title: Facets + items: + $ref: "#/components/schemas/DatasetSearchQueryFacet" + sort: + type: string + title: Sorting of search results + default: "score desc, metadata_modified desc" + rows: + type: integer + title: Max number of rows to return + default: 10 + minimum: 0 + maximum: 1000 + start: + type: integer + title: Offset in the complete result set + default: 0 + minimum: 0 + DatasetSearchQueryFacet: + type: object + properties: + facetGroup: + type: string + title: Facet group + facet: + type: string + title: Facet + value: + type: string + title: Value SearchedDataset: type: object properties: