-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from nulib/3161-search-sort
Add support for the 'sort' query string parameter in GET searches
- Loading branch information
Showing
9 changed files
with
235 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ info: | |
name: NUL Repository Team | ||
email: [email protected] | ||
servers: | ||
- url: https://dcapi.rdc.library.northwestern.edu/api/v2 | ||
- url: https://dcapi.rdc.library.northwestern.edu/api/v2 | ||
tags: | ||
- name: Models | ||
description: > | ||
|
@@ -24,34 +24,35 @@ paths: | |
get: | ||
operationId: getCollections | ||
tags: | ||
- Collection | ||
- Collection | ||
parameters: | ||
- $ref: "./types.yaml#/components/parameters/page" | ||
- $ref: "./types.yaml#/components/parameters/size" | ||
- $ref: "./types.yaml#/components/parameters/page" | ||
- $ref: "./types.yaml#/components/parameters/size" | ||
- $ref: "./types.yaml#/components/parameters/sort" | ||
responses: | ||
200: | ||
$ref: "./types.yaml#/components/responses/SearchResponse" | ||
/collections/{id}: | ||
get: | ||
tags: | ||
- Collection | ||
- Collection | ||
operationId: getCollectionById | ||
parameters: | ||
- $ref: "./types.yaml#/components/parameters/id" | ||
- $ref: "./types.yaml#/components/parameters/as" | ||
- $ref: "./types.yaml#/components/parameters/id" | ||
- $ref: "./types.yaml#/components/parameters/as" | ||
responses: | ||
200: | ||
$ref: "./types.yaml#/components/responses/DocumentResponse" | ||
/collections/{id}/thumbnail: | ||
get: | ||
operationId: getCollectionThumbnail | ||
tags: | ||
- Collection | ||
parameters: | ||
- $ref: "./types.yaml#/components/parameters/id" | ||
- $ref: "./types.yaml#/components/parameters/id" | ||
- $ref: "./types.yaml#/components/parameters/thumbnailAspect" | ||
- $ref: "./types.yaml#/components/parameters/thumbnailSize" | ||
- Collection | ||
parameters: | ||
- $ref: "./types.yaml#/components/parameters/id" | ||
- $ref: "./types.yaml#/components/parameters/id" | ||
- $ref: "./types.yaml#/components/parameters/thumbnailAspect" | ||
- $ref: "./types.yaml#/components/parameters/thumbnailSize" | ||
responses: | ||
200: | ||
description: A thumbnail image for the given collection | ||
|
@@ -64,44 +65,45 @@ paths: | |
get: | ||
operationId: getFileSetById | ||
tags: | ||
- FileSet | ||
- FileSet | ||
parameters: | ||
- $ref: "./types.yaml#/components/parameters/id" | ||
- $ref: "./types.yaml#/components/parameters/id" | ||
responses: | ||
200: | ||
$ref: "./types.yaml#/components/responses/DocumentResponse" | ||
/works/{id}: | ||
get: | ||
operationId: getWorkById | ||
tags: | ||
- Work | ||
- Work | ||
parameters: | ||
- $ref: "./types.yaml#/components/parameters/id" | ||
- $ref: "./types.yaml#/components/parameters/id" | ||
responses: | ||
200: | ||
$ref: "./types.yaml#/components/responses/DocumentResponse" | ||
/works/{id}/similar: | ||
get: | ||
operationId: getSimilarWorks | ||
tags: | ||
- Work | ||
- Work | ||
parameters: | ||
- $ref: "./types.yaml#/components/parameters/id" | ||
- $ref: "./types.yaml#/components/parameters/page" | ||
- $ref: "./types.yaml#/components/parameters/size" | ||
- $ref: "./types.yaml#/components/parameters/as" | ||
- $ref: "./types.yaml#/components/parameters/id" | ||
- $ref: "./types.yaml#/components/parameters/page" | ||
- $ref: "./types.yaml#/components/parameters/size" | ||
- $ref: "./types.yaml#/components/parameters/sort" | ||
- $ref: "./types.yaml#/components/parameters/as" | ||
responses: | ||
200: | ||
$ref: "./types.yaml#/components/responses/SearchResponse" | ||
/works/{id}/thumbnail: | ||
get: | ||
operationId: getWorkThumbnail | ||
tags: | ||
- Work | ||
parameters: | ||
- $ref: "./types.yaml#/components/parameters/id" | ||
- $ref: "./types.yaml#/components/parameters/thumbnailAspect" | ||
- $ref: "./types.yaml#/components/parameters/thumbnailSize" | ||
- Work | ||
parameters: | ||
- $ref: "./types.yaml#/components/parameters/id" | ||
- $ref: "./types.yaml#/components/parameters/thumbnailAspect" | ||
- $ref: "./types.yaml#/components/parameters/thumbnailSize" | ||
responses: | ||
200: | ||
description: A thumbnail image for the given work | ||
|
@@ -114,52 +116,55 @@ paths: | |
get: | ||
operationId: getSearch | ||
tags: | ||
- Search | ||
- Search | ||
parameters: | ||
- $ref: "./types.yaml#/components/parameters/query" | ||
- $ref: "./types.yaml#/components/parameters/searchToken" | ||
- $ref: "./types.yaml#/components/parameters/page" | ||
- $ref: "./types.yaml#/components/parameters/size" | ||
- $ref: "./types.yaml#/components/parameters/sort" | ||
- $ref: "./types.yaml#/components/parameters/as" | ||
responses: | ||
200: | ||
$ref: "./types.yaml#/components/responses/SearchResponse" | ||
post: | ||
operationId: postSearch | ||
tags: | ||
- Search | ||
- Search | ||
requestBody: | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
|
||
responses: | ||
200: | ||
$ref: "./types.yaml#/components/responses/SearchResponse" | ||
/search/{models}: | ||
get: | ||
operationId: getSearchWithModels | ||
tags: | ||
- Search | ||
- Search | ||
parameters: | ||
- $ref: "./types.yaml#/components/parameters/models" | ||
- $ref: "./types.yaml#/components/parameters/query" | ||
- $ref: "./types.yaml#/components/parameters/searchToken" | ||
- $ref: "./types.yaml#/components/parameters/page" | ||
- $ref: "./types.yaml#/components/parameters/size" | ||
- $ref: "./types.yaml#/components/parameters/sort" | ||
- $ref: "./types.yaml#/components/parameters/as" | ||
responses: | ||
200: | ||
$ref: "./types.yaml#/components/responses/SearchResponse" | ||
post: | ||
operationId: postSearchWithModels | ||
tags: | ||
- Search | ||
- Search | ||
parameters: | ||
- $ref: "./types.yaml#/components/parameters/models" | ||
- $ref: "./types.yaml#/components/parameters/page" | ||
- $ref: "./types.yaml#/components/parameters/size" | ||
- $ref: "./types.yaml#/components/parameters/sort" | ||
- $ref: "./types.yaml#/components/parameters/as" | ||
responses: | ||
200: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.