You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+80-22Lines changed: 80 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,17 +38,60 @@ Everything you need for API testing. Nothing you don't.
38
38
-**OpenAPI Import** (`openapi-generate`) — Generate test files from any OpenAPI spec. Point it at a file, and Napper creates `.nap` files with requests, headers, bodies, and assertions. Optionally enhance with AI via GitHub Copilot (`vscode-openapi-ai`).
39
39
-**Plain Text, Git Friendly** (`nap-file`) — Every request is a `.nap` file. Every environment is a `.napenv` file (`env-file`). Version control everything. No binary blobs, no lock-in.
40
40
41
-
## Quick Start
41
+
## Installation
42
+
43
+
### VS Code Extension
42
44
43
-
### Install the VS Code Extension
45
+
Install from the marketplace in one command:
44
46
45
47
```sh
46
48
code --install-extension nimblesite.napper
47
49
```
48
50
49
-
### Or grab the CLI binary
51
+
Or search **"Napper"** in the VS Code Extensions panel (`Ctrl+Shift+X` / `Cmd+Shift+X`) and click Install.
52
+
53
+
To install a specific `.vsix` manually: open the Extensions panel → `...` menu → **Install from VSIX...**.
54
+
55
+
> **Requirements:** VS Code 1.95.0 or later. The extension shells out to the CLI, so install the CLI binary too.
56
+
57
+
### CLI Binary
58
+
59
+
The CLI is a self-contained binary with **no runtime dependencies**.
Generate `.nap` test files automatically from any OpenAPI specification. Available from the CLI and the VS Code extension.
234
+
Generate `.nap` test files automatically from any OpenAPI or Swagger spec. Napper creates one file per operation, a `.naplist` playlist, and a `.napenv` environment file — giving you a working test suite in seconds.
The extension provides two commands (accessible via the Command Palette):
250
+
Open the Command Palette (`Ctrl+Shift+P` / `Cmd+Shift+P`) and choose:
206
251
207
-
-**Napper: Import OpenAPI from URL**—Enter a URL to an OpenAPI spec (e.g. `https://petstore3.swagger.io/api/v3/openapi.json`). The extension downloads the spec, generates `.nap` files, and creates a `.naplist` playlist.
208
-
-**Napper: Import OpenAPI from File**—Select a local OpenAPI spec file (JSON or YAML) and an output folder.
252
+
-**Napper: Import OpenAPI from URL**—paste a URL (e.g. `https://petstore3.swagger.io/api/v3/openapi.json`). Napper downloads the specand generates files.
253
+
-**Napper: Import OpenAPI from File**—browse to a local `.json` spec file.
209
254
210
-
Both commands prompt you to choose between basic generation or AI-enhanced generation (requires GitHub Copilot). AI enhancement adds smarter assertions, realistic test data, and reorders the playlist for logical test flow.
255
+
Both commands prompt for an output folder and offer basic or AI-enhanced generation.
211
256
212
257
### What gets generated
213
258
214
-
| File | Purpose |
215
-
|------|---------|
216
-
|`01_get-users.nap`, `02_post-users.nap`, ... | One `.nap` file per API endpoint with request, headers, body, and assertions |
217
-
|`api-name.naplist`| Playlist referencing all generated files in order |
218
-
|`.napenv`| Environment file with the API base URL |
259
+
Endpoints are grouped into subdirectories by API tag:
260
+
261
+
```
262
+
tests/
263
+
├── pets/
264
+
│ ├── get-pets.nap
265
+
│ ├── post-pets.nap
266
+
│ └── get-pets-petId.nap
267
+
├── store/
268
+
│ └── get-store-inventory.nap
269
+
├── petstore.naplist
270
+
└── .napenv
271
+
```
272
+
273
+
Each `.nap` file includes the method, URL (with path params as `{{variables}}`), auth headers, request body (from schema), and status code assertions. The `.napenv` file contains the base URL from the spec's `servers` field and variable placeholders for auth tokens.
274
+
275
+
### AI Enhancement (optional)
219
276
220
-
### AI Enhancement (Optional)
277
+
With GitHub Copilot available, choose AI-enhanced generation to get:
221
278
222
-
When GitHub Copilot is available, you can opt for AI-enhanced generation which:
279
+
- Semantic assertions beyond status codes (e.g. `body.email contains @`)
280
+
- Realistic test data in request bodies instead of placeholder values
281
+
- Logical playlist ordering (auth first, then CRUD in dependency order)
- Generates realistic test data for request bodies
226
-
- Reorders the playlist for logical flow (auth first, then CRUD operations)
283
+
Falls back to basic generation automatically if Copilot is unavailable.
227
284
228
-
If Copilot is not available, a warning is shown and basic generation proceeds normally.
285
+
See the [full OpenAPI import guide](https://napperapi.dev/docs/openapi-import/) for authentication handling, `$ref` resolution, customisation tips, and troubleshooting.
0 commit comments