Skip to content

Commit

Permalink
feat: move datasets search query args to request body
Browse files Browse the repository at this point in the history
  • Loading branch information
brunopacheco1 committed Apr 4, 2024
1 parent 9cfbb58 commit bb0aa96
Showing 1 changed file with 44 additions and 39 deletions.
83 changes: 44 additions & 39 deletions src/main/openapi/discovery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit bb0aa96

Please sign in to comment.