Skip to content

Commit be5249a

Browse files
shmamwraithgar
andauthored
chore: adding search example responses (#38)
Adding a couple search example responses for `SearchResults` and `MissingField` in `search.yaml` ## References - follow up of #35 --------- Co-authored-by: Gar <wraithgar@github.com>
1 parent b7e499a commit be5249a

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

api/registry.npmjs.com/search.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ components:
1313
code:
1414
type: string
1515
description: Error code for this response
16+
example:
17+
error: "'text' query parameter is required"
18+
code: "ERR_TEXT_MISSING"
1619
SearchResults:
1720
description: Search results
1821
content:
@@ -126,6 +129,50 @@ components:
126129
type: string
127130
format: date-time
128131
description: The current time
132+
example:
133+
objects:
134+
- downloads:
135+
monthly: 412841
136+
weekly: 93602
137+
dependents: 20
138+
updated: "2026-03-24T07:35:20.725Z"
139+
searchScore: 1538.6487
140+
package:
141+
name: "@npm/types"
142+
keywords:
143+
- "npm registry"
144+
- "types"
145+
- "typescript"
146+
- "definitions"
147+
- "typings"
148+
version: "2.1.0"
149+
description: "Typescript definitions for npm registry content"
150+
sanitized_name: "@npm/types"
151+
publisher:
152+
email: "npm-robot@github.com"
153+
username: "npm-robot"
154+
maintainers:
155+
- email: "npm@npmjs.com"
156+
username: "npm"
157+
- email: "ops@npmjs.com"
158+
username: "npmci"
159+
license: "MIT"
160+
date: "2025-04-28T20:18:14.734Z"
161+
links:
162+
homepage: "https://github.com/npm/types#readme"
163+
repository: "git+https://github.com/npm/types.git"
164+
bugs: "https://github.com/npm/types/issues"
165+
npm: "https://www.npmjs.com/package/@npm/types"
166+
score:
167+
final: 1538.6487
168+
detail:
169+
popularity: 1
170+
quality: 1
171+
maintenance: 1
172+
flags:
173+
insecure: 0
174+
total: 1
175+
time: "2026-03-24T07:35:20.725Z"
129176
paths:
130177
/-/v1/search:
131178
get:

0 commit comments

Comments
 (0)