Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: fast exact name search by default #66

Merged
merged 3 commits into from
Oct 27, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 23 additions & 3 deletions ipfs-pinning-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ paths:
parameters:
- $ref: '#/components/parameters/cid'
- $ref: '#/components/parameters/name'
- $ref: '#/components/parameters/match'
- $ref: '#/components/parameters/status'
- $ref: '#/components/parameters/before'
- $ref: '#/components/parameters/after'
Expand Down Expand Up @@ -406,7 +407,7 @@ components:
description: Optional name for pinned data; can be used for lookups later
type: string
maxLength: 255
example: "my precious data"
example: "PreciousData.pdf"
origins:
$ref: '#/components/schemas/Origins'
meta:
Expand Down Expand Up @@ -461,6 +462,16 @@ components:
example:
status_details: "Queue position: 7 of 9" # PinStatus.info[status_details], when status=queued

TextMatchingStrategy:
description: Alternative text matching strategy
type: string
default: exact
enum:
- exact # full match, case-sensitive (the implicit default)
- iexact # full match, case-insensitive
- partial # partial match, case-sensitive
- ipartial # partial match, case-insensitive

Failure:
description: Response for a failed request
type: object
Expand Down Expand Up @@ -532,14 +543,23 @@ components:
example: ["Qm1","Qm2","bafy3"]

name:
description: Return pin objects with names that contain provided value (case-insensitive, partial or full match)
description: Return pin objects with specified name (by default a case-sensitive, exact match)
name: name
in: query
required: false
schema:
type: string
maxLength: 255
example: "my precious"
example: "PreciousData.pdf"

match:
description: Customize the text matching strategy applied when name filter is present
name: match
in: query
required: false
schema:
$ref: '#/components/schemas/TextMatchingStrategy'
example: exact

status:
description: Return pin objects for pins with the specified status
Expand Down