specli 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +76 -86
- package/cli.ts +4 -10
- package/package.json +8 -2
- package/src/cli/compile.ts +5 -28
- package/src/cli/derive-name.ts +2 -2
- package/src/cli/exec.ts +1 -1
- package/src/cli/main.ts +12 -27
- package/src/cli/runtime/auth/resolve.ts +10 -2
- package/src/cli/runtime/body-flags.ts +176 -0
- package/src/cli/runtime/execute.ts +41 -91
- package/src/cli/runtime/generated.ts +28 -93
- package/src/cli/runtime/profile/secrets.ts +1 -1
- package/src/cli/runtime/profile/store.ts +1 -1
- package/src/cli/runtime/request.ts +42 -152
- package/src/cli/stable-json.ts +2 -2
- package/src/compiled.ts +13 -15
- package/src/macros/env.ts +0 -4
- package/CLAUDE.md +0 -111
- package/PLAN.md +0 -274
- package/biome.jsonc +0 -1
- package/bun.lock +0 -98
- package/fixtures/openapi-array-items.json +0 -22
- package/fixtures/openapi-auth.json +0 -34
- package/fixtures/openapi-body.json +0 -41
- package/fixtures/openapi-collision.json +0 -21
- package/fixtures/openapi-oauth.json +0 -54
- package/fixtures/openapi-servers.json +0 -35
- package/fixtures/openapi.json +0 -87
- package/scripts/smoke-specs.ts +0 -64
- package/src/cli/auth-requirements.test.ts +0 -27
- package/src/cli/auth-schemes.test.ts +0 -66
- package/src/cli/capabilities.test.ts +0 -94
- package/src/cli/command-id.test.ts +0 -32
- package/src/cli/command-model.test.ts +0 -44
- package/src/cli/naming.test.ts +0 -86
- package/src/cli/operations.test.ts +0 -57
- package/src/cli/params.test.ts +0 -70
- package/src/cli/positional.test.ts +0 -65
- package/src/cli/request-body.test.ts +0 -35
- package/src/cli/runtime/request.test.ts +0 -153
- package/src/cli/server.test.ts +0 -35
- package/tsconfig.json +0 -29
package/PLAN.md
DELETED
|
@@ -1,274 +0,0 @@
|
|
|
1
|
-
# OpenCLI Planning Document
|
|
2
|
-
|
|
3
|
-
## Goal
|
|
4
|
-
OpenCLI turns an OpenAPI spec (3.0 or 3.1) into a non-interactive, highly-discoverable CLI suitable for automation and AI agents.
|
|
5
|
-
|
|
6
|
-
Example mapping:
|
|
7
|
-
- `GET /contacts` -> `opencli contacts list`
|
|
8
|
-
- `GET /contacts/{id}` -> `opencli contacts get <id>`
|
|
9
|
-
|
|
10
|
-
The CLI must work in two modes:
|
|
11
|
-
- Runtime mode: `opencli exec <url|path> ...`
|
|
12
|
-
- Standalone mode (compiled executable): `opencli compile <url|path>` embeds the spec at build time
|
|
13
|
-
|
|
14
|
-
## Design Principles
|
|
15
|
-
- Deterministic: given the same spec + config, command names and flags are stable.
|
|
16
|
-
- Discoverable: `--help` is comprehensive and generated from the spec.
|
|
17
|
-
- Script-first: output defaults should be machine-friendly; no prompts.
|
|
18
|
-
- Flexible naming: supports both REST-style paths and RPC-style operation naming.
|
|
19
|
-
- Extensible: supports new OpenAPI versions and naming strategies without rewrites.
|
|
20
|
-
|
|
21
|
-
## Non-Goals (v1)
|
|
22
|
-
- Interactive flows (prompts, wizards).
|
|
23
|
-
- Full code generation of a bespoke CLI per API (v1 is runtime generation; standalone is packaging + embedding).
|
|
24
|
-
- Perfect coverage of all JSON Schema edge-cases in flag expansion (support will be iterative).
|
|
25
|
-
|
|
26
|
-
## Entry Points
|
|
27
|
-
|
|
28
|
-
### 1) Runtime / "exec" entry
|
|
29
|
-
Intent: run the package directly and point it at a spec.
|
|
30
|
-
|
|
31
|
-
Command:
|
|
32
|
-
- `opencli exec https://example.com/openapi.json contacts list`
|
|
33
|
-
|
|
34
|
-
Notes:
|
|
35
|
-
- In Bun ecosystems, `bunx opencli ...` is the direct equivalent of `npx opencli ...`.
|
|
36
|
-
- We can publish a `bin` that runs under Bun (`#!/usr/bin/env bun`) assuming Bun is installed.
|
|
37
|
-
|
|
38
|
-
### 2) Standalone compiled entry
|
|
39
|
-
Intent: ship a single executable that contains the spec.
|
|
40
|
-
|
|
41
|
-
Build:
|
|
42
|
-
- `opencli compile <spec> --name myapi`
|
|
43
|
-
|
|
44
|
-
Behavior:
|
|
45
|
-
- Default spec comes from an embedded module generated at build time via Bun macro.
|
|
46
|
-
- Still allow overriding spec at runtime (`--spec`) for debugging unless explicitly disabled.
|
|
47
|
-
- The compiled binary name becomes the CLI root (e.g., `./dist/myapi contacts list`).
|
|
48
|
-
|
|
49
|
-
## High-Level Architecture
|
|
50
|
-
|
|
51
|
-
### Modules
|
|
52
|
-
- `SpecLoader`
|
|
53
|
-
- Accepts `--spec` (URL or file path) or `embeddedSpec`.
|
|
54
|
-
- Produces a fully dereferenced OpenAPI document.
|
|
55
|
-
- Produces a fingerprint (hash) for caching and diagnostics.
|
|
56
|
-
|
|
57
|
-
- `OperationIndex`
|
|
58
|
-
- Flattens the OpenAPI doc into a list of normalized operations:
|
|
59
|
-
- `method`, `path`, `operationId`, `tags`, `summary`, `description`
|
|
60
|
-
- `parameters` (path/query/header/cookie)
|
|
61
|
-
- `requestBody` (content types, schemas)
|
|
62
|
-
- `responses` (optional for future output formatting)
|
|
63
|
-
- `security` requirements
|
|
64
|
-
|
|
65
|
-
- `CommandPlanner` (naming + command tree)
|
|
66
|
-
- Converts operations into a command tree:
|
|
67
|
-
- `resource` (plural, kebab-case)
|
|
68
|
-
- `action` (list/get/create/update/delete for REST; parsed names for RPC)
|
|
69
|
-
- positional args (path params)
|
|
70
|
-
- flags (query/header/body)
|
|
71
|
-
- Handles collisions with stable disambiguation.
|
|
72
|
-
|
|
73
|
-
- `ArgDeriver`
|
|
74
|
-
- Produces a CLI argument schema from each operation:
|
|
75
|
-
- path params -> required positionals
|
|
76
|
-
- query params -> flags
|
|
77
|
-
- headers -> flags or generic `--header`
|
|
78
|
-
- body -> fully expanded flags + `--data` / `--file`
|
|
79
|
-
- Supports validation and helpful error messages.
|
|
80
|
-
|
|
81
|
-
- `Runner`
|
|
82
|
-
- Builds the HTTP request from parsed args:
|
|
83
|
-
- server/base URL resolution
|
|
84
|
-
- auth injection
|
|
85
|
-
- query serialization
|
|
86
|
-
- body serialization
|
|
87
|
-
- Executes via `fetch`.
|
|
88
|
-
- Formats output.
|
|
89
|
-
|
|
90
|
-
- `AuthManager` / `ProfileStore`
|
|
91
|
-
- First-class auth derived from `components.securitySchemes`.
|
|
92
|
-
- Stores credentials in system keychain via `import { secrets } from "bun"`.
|
|
93
|
-
- Supports multiple profiles and selection via `--profile`.
|
|
94
|
-
|
|
95
|
-
### External Libraries (initial)
|
|
96
|
-
- `commander`: dynamic commands + good help
|
|
97
|
-
- `@apidevtools/swagger-parser`: load, validate, dereference `$ref`
|
|
98
|
-
- `openapi-types`: TS types for OpenAPI 3.x
|
|
99
|
-
- `ajv` + `ajv-formats`: validate query/body against schema (best-effort across 3.0/3.1)
|
|
100
|
-
|
|
101
|
-
## OpenAPI 3.0 vs 3.1 Support
|
|
102
|
-
|
|
103
|
-
### Strategy
|
|
104
|
-
- Parse and dereference both versions using Swagger Parser.
|
|
105
|
-
- Normalize schema handling behind a small internal interface so we can evolve support.
|
|
106
|
-
|
|
107
|
-
Key differences (relevant to us):
|
|
108
|
-
- OpenAPI 3.1 aligns more closely with modern JSON Schema (2020-12).
|
|
109
|
-
- OpenAPI 3.0 uses a schema dialect closer to older drafts and has some OpenAPI-specific constraints.
|
|
110
|
-
|
|
111
|
-
Pragmatic v1 approach:
|
|
112
|
-
- Use schema traversal primarily for:
|
|
113
|
-
- flag generation (types, required fields, enums)
|
|
114
|
-
- basic validation (required, type checking, enum)
|
|
115
|
-
- Implement deep JSON Schema semantics incrementally (oneOf/anyOf/allOf, discriminators).
|
|
116
|
-
|
|
117
|
-
## Command Naming Rules
|
|
118
|
-
|
|
119
|
-
### Resource (group) naming
|
|
120
|
-
Goal: always end up with a plural, kebab-case resource name.
|
|
121
|
-
|
|
122
|
-
Primary sources (in priority order):
|
|
123
|
-
1) Config overrides (future: `opencli.config.json`)
|
|
124
|
-
2) `tags[0]` when tags exist and are not generic
|
|
125
|
-
3) `operationId` namespace prefix when it looks RPC-ish:
|
|
126
|
-
- `Contacts.List` -> resource `contacts`
|
|
127
|
-
4) Path first segment for REST-ish endpoints:
|
|
128
|
-
- `/contacts/{id}` -> `contacts`
|
|
129
|
-
|
|
130
|
-
Pluralization:
|
|
131
|
-
- Normalize to plural even if spec uses singular:
|
|
132
|
-
- `/contact/{id}` -> resource `contacts`
|
|
133
|
-
- Use a small pluralization utility (English rules + irregular map).
|
|
134
|
-
- Allow overrides for weird domains (e.g. `people`, `metadata`).
|
|
135
|
-
|
|
136
|
-
### Action naming
|
|
137
|
-
REST-ish defaults:
|
|
138
|
-
- `GET /resource` -> `list`
|
|
139
|
-
- `POST /resource` -> `create`
|
|
140
|
-
- `GET /resource/{id}` -> `get`
|
|
141
|
-
- `PUT/PATCH /resource/{id}` -> `update`
|
|
142
|
-
- `DELETE /resource/{id}` -> `delete`
|
|
143
|
-
|
|
144
|
-
RPC-ish defaults:
|
|
145
|
-
- Prefer parsed suffix from `operationId` or last path segment:
|
|
146
|
-
- `Contacts.List` -> action `list`
|
|
147
|
-
- `Contacts.Retrieve` -> action `get` (canonicalize to REST verbs when it maps cleanly)
|
|
148
|
-
- If no good name exists, fall back to HTTP method.
|
|
149
|
-
|
|
150
|
-
Collision handling:
|
|
151
|
-
- If multiple operations map to the same `resource action`, disambiguate deterministically by:
|
|
152
|
-
1) adding a stable qualifier from the path (`contacts list-by-company`)
|
|
153
|
-
2) else adding a suffix derived from `operationId`
|
|
154
|
-
|
|
155
|
-
## Argument Derivation Rules
|
|
156
|
-
|
|
157
|
-
### Path params
|
|
158
|
-
- Required positional args, in path order.
|
|
159
|
-
- Use param name directly: `contacts get <id>`.
|
|
160
|
-
|
|
161
|
-
### Query params
|
|
162
|
-
- Flags in kebab-case.
|
|
163
|
-
- Required query params are marked required in help and validated.
|
|
164
|
-
|
|
165
|
-
### Header params
|
|
166
|
-
- Provide a generic `--header "Name: Value"` (repeatable).
|
|
167
|
-
- Also generate first-class flags for declared header params when safe.
|
|
168
|
-
|
|
169
|
-
### Request body
|
|
170
|
-
Support both:
|
|
171
|
-
1) Fully expanded flags derived from JSON schema
|
|
172
|
-
- Namespace by default to avoid collisions:
|
|
173
|
-
- `--body-name`, `--body-address-city`
|
|
174
|
-
- If a spec is simple, consider a future option to un-prefix.
|
|
175
|
-
2) Escape hatches
|
|
176
|
-
- `--data <json>` for inline JSON
|
|
177
|
-
- `--file <path>` for JSON/YAML file
|
|
178
|
-
|
|
179
|
-
Complex schemas:
|
|
180
|
-
- For `oneOf/anyOf/allOf`, generate help guidance and prefer `--data/--file` until richer support is implemented.
|
|
181
|
-
|
|
182
|
-
## Auth and Profiles
|
|
183
|
-
|
|
184
|
-
### Discovering auth
|
|
185
|
-
- Read `components.securitySchemes` and `security` requirements.
|
|
186
|
-
- Generate top-level auth flags based on supported schemes:
|
|
187
|
-
- HTTP bearer: `--bearer-token`
|
|
188
|
-
- HTTP basic: `--username`, `--password` (password via keychain/profile)
|
|
189
|
-
- API key: `--api-key` plus location awareness (header/query)
|
|
190
|
-
- OAuth2: start with token-based usage; full auth-code flow can come later
|
|
191
|
-
|
|
192
|
-
### Profiles
|
|
193
|
-
- `opencli auth login --profile <name> ...`
|
|
194
|
-
- `opencli auth logout --profile <name>`
|
|
195
|
-
- `opencli auth whoami --profile <name>` (optional)
|
|
196
|
-
|
|
197
|
-
Storage:
|
|
198
|
-
- Use Bun keychain: `import { secrets } from "bun"`.
|
|
199
|
-
- Store only identifiers and non-sensitive config on disk (profile names, server URL).
|
|
200
|
-
- Store secrets (tokens, passwords, client secrets) in keychain.
|
|
201
|
-
|
|
202
|
-
Invocation:
|
|
203
|
-
- `--profile <name>` selects credentials and default server.
|
|
204
|
-
- Explicit flags override profile.
|
|
205
|
-
|
|
206
|
-
## Output
|
|
207
|
-
- Default: JSON pretty print to stdout.
|
|
208
|
-
- `--json`: raw JSON (no extra formatting).
|
|
209
|
-
- `--status`: include HTTP status code.
|
|
210
|
-
- `--headers`: include response headers.
|
|
211
|
-
- `--dry-run` or `--curl`: print the request without sending.
|
|
212
|
-
|
|
213
|
-
Errors:
|
|
214
|
-
- Non-2xx exits with non-zero code.
|
|
215
|
-
- Error output goes to stderr and is structured when `--json` is set.
|
|
216
|
-
|
|
217
|
-
## Discoverability for Agents
|
|
218
|
-
|
|
219
|
-
In addition to `--help`, provide a machine-readable schema:
|
|
220
|
-
- `opencli __schema --json`
|
|
221
|
-
- Prints command tree, operations, args, flags, types, required, enums.
|
|
222
|
-
- Includes the underlying `method` + `path` mapping.
|
|
223
|
-
|
|
224
|
-
This enables agents to plan calls without scraping help text.
|
|
225
|
-
|
|
226
|
-
## Configuration
|
|
227
|
-
- Global flags:
|
|
228
|
-
- `--spec <url|path>`
|
|
229
|
-
- `--server <url>`
|
|
230
|
-
- `--profile <name>`
|
|
231
|
-
- `--json`, `--dry-run`, `--headers`, `--status`, `--verbose`
|
|
232
|
-
|
|
233
|
-
Future:
|
|
234
|
-
- `opencli.config.json` to override naming, pluralization, and grouping.
|
|
235
|
-
|
|
236
|
-
## Implementation Phases
|
|
237
|
-
|
|
238
|
-
Phase 1: Skeleton and spec loading
|
|
239
|
-
- Load and dereference OpenAPI (local + remote).
|
|
240
|
-
- Build operation index.
|
|
241
|
-
- Print debug view / `__schema`.
|
|
242
|
-
|
|
243
|
-
Phase 2: Naming + command tree
|
|
244
|
-
- Implement REST + RPC naming heuristics.
|
|
245
|
-
- Implement pluralization normalization.
|
|
246
|
-
- Implement collision strategy.
|
|
247
|
-
|
|
248
|
-
Phase 3: Argument derivation
|
|
249
|
-
- Path + query + headers.
|
|
250
|
-
- Request body `--data` / `--file`.
|
|
251
|
-
- Basic schema-walk expansion for `object` with scalar props.
|
|
252
|
-
|
|
253
|
-
Phase 4: Runner
|
|
254
|
-
- Server selection.
|
|
255
|
-
- Request construction and fetch.
|
|
256
|
-
- Output formatting + exit codes.
|
|
257
|
-
|
|
258
|
-
Phase 5: Auth + profiles
|
|
259
|
-
- Parse security schemes.
|
|
260
|
-
- Implement `auth` subcommands.
|
|
261
|
-
- Keychain-backed secret storage.
|
|
262
|
-
|
|
263
|
-
Phase 6: Standalone bundling
|
|
264
|
-
- Add `compile` command with Bun macro-based spec embedding.
|
|
265
|
-
- Document build steps.
|
|
266
|
-
|
|
267
|
-
## Testing
|
|
268
|
-
- Use `bun test`.
|
|
269
|
-
- Focus on deterministic unit tests for:
|
|
270
|
-
- naming heuristics (REST and RPC)
|
|
271
|
-
- pluralization edge cases
|
|
272
|
-
- arg derivation from schemas
|
|
273
|
-
- auth scheme parsing
|
|
274
|
-
- Add small fixture specs (minimal REST, minimal RPC, mixed).
|
package/biome.jsonc
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|
package/bun.lock
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"lockfileVersion": 1,
|
|
3
|
-
"configVersion": 1,
|
|
4
|
-
"workspaces": {
|
|
5
|
-
"": {
|
|
6
|
-
"name": "opencli",
|
|
7
|
-
"dependencies": {
|
|
8
|
-
"@apidevtools/swagger-parser": "^12.1.0",
|
|
9
|
-
"ajv": "^8.17.1",
|
|
10
|
-
"ajv-formats": "^3.0.1",
|
|
11
|
-
"commander": "^14.0.2",
|
|
12
|
-
"openapi-types": "^12.1.3",
|
|
13
|
-
},
|
|
14
|
-
"devDependencies": {
|
|
15
|
-
"@biomejs/biome": "^2.3.11",
|
|
16
|
-
"@types/bun": "^1.3.6",
|
|
17
|
-
"@typescript/native-preview": "^7.0.0-dev.20260120.1",
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
"packages": {
|
|
22
|
-
"@apidevtools/json-schema-ref-parser": ["@apidevtools/json-schema-ref-parser@14.0.1", "", { "dependencies": { "@types/json-schema": "^7.0.15", "js-yaml": "^4.1.0" } }, "sha512-Oc96zvmxx1fqoSEdUmfmvvb59/KDOnUoJ7s2t7bISyAn0XEz57LCCw8k2Y4Pf3mwKaZLMciESALORLgfe2frCw=="],
|
|
23
|
-
|
|
24
|
-
"@apidevtools/openapi-schemas": ["@apidevtools/openapi-schemas@2.1.0", "", {}, "sha512-Zc1AlqrJlX3SlpupFGpiLi2EbteyP7fXmUOGup6/DnkRgjP9bgMM/ag+n91rsv0U1Gpz0H3VILA/o3bW7Ua6BQ=="],
|
|
25
|
-
|
|
26
|
-
"@apidevtools/swagger-methods": ["@apidevtools/swagger-methods@3.0.2", "", {}, "sha512-QAkD5kK2b1WfjDS/UQn/qQkbwF31uqRjPTrsCs5ZG9BQGAkjwvqGFjjPqAuzac/IYzpPtRzjCP1WrTuAIjMrXg=="],
|
|
27
|
-
|
|
28
|
-
"@apidevtools/swagger-parser": ["@apidevtools/swagger-parser@12.1.0", "", { "dependencies": { "@apidevtools/json-schema-ref-parser": "14.0.1", "@apidevtools/openapi-schemas": "^2.1.0", "@apidevtools/swagger-methods": "^3.0.2", "ajv": "^8.17.1", "ajv-draft-04": "^1.0.0", "call-me-maybe": "^1.0.2" }, "peerDependencies": { "openapi-types": ">=7" } }, "sha512-e5mJoswsnAX0jG+J09xHFYQXb/bUc5S3pLpMxUuRUA2H8T2kni3yEoyz2R3Dltw5f4A6j6rPNMpWTK+iVDFlng=="],
|
|
29
|
-
|
|
30
|
-
"@biomejs/biome": ["@biomejs/biome@2.3.11", "", { "optionalDependencies": { "@biomejs/cli-darwin-arm64": "2.3.11", "@biomejs/cli-darwin-x64": "2.3.11", "@biomejs/cli-linux-arm64": "2.3.11", "@biomejs/cli-linux-arm64-musl": "2.3.11", "@biomejs/cli-linux-x64": "2.3.11", "@biomejs/cli-linux-x64-musl": "2.3.11", "@biomejs/cli-win32-arm64": "2.3.11", "@biomejs/cli-win32-x64": "2.3.11" }, "bin": { "biome": "bin/biome" } }, "sha512-/zt+6qazBWguPG6+eWmiELqO+9jRsMZ/DBU3lfuU2ngtIQYzymocHhKiZRyrbra4aCOoyTg/BmY+6WH5mv9xmQ=="],
|
|
31
|
-
|
|
32
|
-
"@biomejs/cli-darwin-arm64": ["@biomejs/cli-darwin-arm64@2.3.11", "", { "os": "darwin", "cpu": "arm64" }, "sha512-/uXXkBcPKVQY7rc9Ys2CrlirBJYbpESEDme7RKiBD6MmqR2w3j0+ZZXRIL2xiaNPsIMMNhP1YnA+jRRxoOAFrA=="],
|
|
33
|
-
|
|
34
|
-
"@biomejs/cli-darwin-x64": ["@biomejs/cli-darwin-x64@2.3.11", "", { "os": "darwin", "cpu": "x64" }, "sha512-fh7nnvbweDPm2xEmFjfmq7zSUiox88plgdHF9OIW4i99WnXrAC3o2P3ag9judoUMv8FCSUnlwJCM1B64nO5Fbg=="],
|
|
35
|
-
|
|
36
|
-
"@biomejs/cli-linux-arm64": ["@biomejs/cli-linux-arm64@2.3.11", "", { "os": "linux", "cpu": "arm64" }, "sha512-l4xkGa9E7Uc0/05qU2lMYfN1H+fzzkHgaJoy98wO+b/7Gl78srbCRRgwYSW+BTLixTBrM6Ede5NSBwt7rd/i6g=="],
|
|
37
|
-
|
|
38
|
-
"@biomejs/cli-linux-arm64-musl": ["@biomejs/cli-linux-arm64-musl@2.3.11", "", { "os": "linux", "cpu": "arm64" }, "sha512-XPSQ+XIPZMLaZ6zveQdwNjbX+QdROEd1zPgMwD47zvHV+tCGB88VH+aynyGxAHdzL+Tm/+DtKST5SECs4iwCLg=="],
|
|
39
|
-
|
|
40
|
-
"@biomejs/cli-linux-x64": ["@biomejs/cli-linux-x64@2.3.11", "", { "os": "linux", "cpu": "x64" }, "sha512-/1s9V/H3cSe0r0Mv/Z8JryF5x9ywRxywomqZVLHAoa/uN0eY7F8gEngWKNS5vbbN/BsfpCG5yeBT5ENh50Frxg=="],
|
|
41
|
-
|
|
42
|
-
"@biomejs/cli-linux-x64-musl": ["@biomejs/cli-linux-x64-musl@2.3.11", "", { "os": "linux", "cpu": "x64" }, "sha512-vU7a8wLs5C9yJ4CB8a44r12aXYb8yYgBn+WeyzbMjaCMklzCv1oXr8x+VEyWodgJt9bDmhiaW/I0RHbn7rsNmw=="],
|
|
43
|
-
|
|
44
|
-
"@biomejs/cli-win32-arm64": ["@biomejs/cli-win32-arm64@2.3.11", "", { "os": "win32", "cpu": "arm64" }, "sha512-PZQ6ElCOnkYapSsysiTy0+fYX+agXPlWugh6+eQ6uPKI3vKAqNp6TnMhoM3oY2NltSB89hz59o8xIfOdyhi9Iw=="],
|
|
45
|
-
|
|
46
|
-
"@biomejs/cli-win32-x64": ["@biomejs/cli-win32-x64@2.3.11", "", { "os": "win32", "cpu": "x64" }, "sha512-43VrG813EW+b5+YbDbz31uUsheX+qFKCpXeY9kfdAx+ww3naKxeVkTD9zLIWxUPfJquANMHrmW3wbe/037G0Qg=="],
|
|
47
|
-
|
|
48
|
-
"@types/bun": ["@types/bun@1.3.6", "", { "dependencies": { "bun-types": "1.3.6" } }, "sha512-uWCv6FO/8LcpREhenN1d1b6fcspAB+cefwD7uti8C8VffIv0Um08TKMn98FynpTiU38+y2dUO55T11NgDt8VAA=="],
|
|
49
|
-
|
|
50
|
-
"@types/json-schema": ["@types/json-schema@7.0.15", "", {}, "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA=="],
|
|
51
|
-
|
|
52
|
-
"@types/node": ["@types/node@25.0.9", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-/rpCXHlCWeqClNBwUhDcusJxXYDjZTyE8v5oTO7WbL8eij2nKhUeU89/6xgjU7N4/Vh3He0BtyhJdQbDyhiXAw=="],
|
|
53
|
-
|
|
54
|
-
"@typescript/native-preview": ["@typescript/native-preview@7.0.0-dev.20260120.1", "", { "optionalDependencies": { "@typescript/native-preview-darwin-arm64": "7.0.0-dev.20260120.1", "@typescript/native-preview-darwin-x64": "7.0.0-dev.20260120.1", "@typescript/native-preview-linux-arm": "7.0.0-dev.20260120.1", "@typescript/native-preview-linux-arm64": "7.0.0-dev.20260120.1", "@typescript/native-preview-linux-x64": "7.0.0-dev.20260120.1", "@typescript/native-preview-win32-arm64": "7.0.0-dev.20260120.1", "@typescript/native-preview-win32-x64": "7.0.0-dev.20260120.1" }, "bin": { "tsgo": "bin/tsgo.js" } }, "sha512-nnEf37C9ue7OBRnF2zmV/OCBmV5Y7T/K4mCHa+nxgiXcF/1w8sA0cgdFl+gHQ0mysqUJ+Bu5btAMeWgpLyjrgg=="],
|
|
55
|
-
|
|
56
|
-
"@typescript/native-preview-darwin-arm64": ["@typescript/native-preview-darwin-arm64@7.0.0-dev.20260120.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-r3pWFuR2H7mn6ScwpH5jJljKQqKto0npVuJSk6pRwFwexpTyxOGmJTZJ1V0AWiisaNxU2+CNAqWFJSJYIE/QTg=="],
|
|
57
|
-
|
|
58
|
-
"@typescript/native-preview-darwin-x64": ["@typescript/native-preview-darwin-x64@7.0.0-dev.20260120.1", "", { "os": "darwin", "cpu": "x64" }, "sha512-cuC1+wLbUP+Ip2UT94G134fqRdp5w3b3dhcCO6/FQ4yXxvRNyv/WK+upHBUFDaeSOeHgDTyO9/QFYUWwC4If1A=="],
|
|
59
|
-
|
|
60
|
-
"@typescript/native-preview-linux-arm": ["@typescript/native-preview-linux-arm@7.0.0-dev.20260120.1", "", { "os": "linux", "cpu": "arm" }, "sha512-vN6OYVySol/kQZjJGmAzd6L30SyVlCgmCXS8WjUYtE5clN0YrzQHop16RK29fYZHMxpkOniVBtRPxUYQANZBlQ=="],
|
|
61
|
-
|
|
62
|
-
"@typescript/native-preview-linux-arm64": ["@typescript/native-preview-linux-arm64@7.0.0-dev.20260120.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-zZGvEGY7wcHYefMZ87KNmvjN3NLIhsCMHEpHZiGCS3khKf+8z6ZsanrzCjOTodvL01VPyBzHxV1EtkSxAcLiQg=="],
|
|
63
|
-
|
|
64
|
-
"@typescript/native-preview-linux-x64": ["@typescript/native-preview-linux-x64@7.0.0-dev.20260120.1", "", { "os": "linux", "cpu": "x64" }, "sha512-JBfNhWd/asd5MDeS3VgRvE24pGKBkmvLub6tsux6ypr+Yhy+o0WaAEzVpmlRYZUqss2ai5tvOu4dzPBXzZAtFw=="],
|
|
65
|
-
|
|
66
|
-
"@typescript/native-preview-win32-arm64": ["@typescript/native-preview-win32-arm64@7.0.0-dev.20260120.1", "", { "os": "win32", "cpu": "arm64" }, "sha512-tTndRtYCq2xwgE0VkTi9ACNiJaV43+PqvBqCxk8ceYi3X36Ve+CCnwlZfZJ4k9NxZthtrAwF/kUmpC9iIYbq1w=="],
|
|
67
|
-
|
|
68
|
-
"@typescript/native-preview-win32-x64": ["@typescript/native-preview-win32-x64@7.0.0-dev.20260120.1", "", { "os": "win32", "cpu": "x64" }, "sha512-oZia7hFL6k9pVepfonuPI86Jmyz6WlJKR57tWCDwRNmpA7odxuTq1PbvcYgy1z4+wHF1nnKKJY0PMAiq6ac18w=="],
|
|
69
|
-
|
|
70
|
-
"ajv": ["ajv@8.17.1", "", { "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2" } }, "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g=="],
|
|
71
|
-
|
|
72
|
-
"ajv-draft-04": ["ajv-draft-04@1.0.0", "", { "peerDependencies": { "ajv": "^8.5.0" }, "optionalPeers": ["ajv"] }, "sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw=="],
|
|
73
|
-
|
|
74
|
-
"ajv-formats": ["ajv-formats@3.0.1", "", { "dependencies": { "ajv": "^8.0.0" } }, "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ=="],
|
|
75
|
-
|
|
76
|
-
"argparse": ["argparse@2.0.1", "", {}, "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="],
|
|
77
|
-
|
|
78
|
-
"bun-types": ["bun-types@1.3.6", "", { "dependencies": { "@types/node": "*" } }, "sha512-OlFwHcnNV99r//9v5IIOgQ9Uk37gZqrNMCcqEaExdkVq3Avwqok1bJFmvGMCkCE0FqzdY8VMOZpfpR3lwI+CsQ=="],
|
|
79
|
-
|
|
80
|
-
"call-me-maybe": ["call-me-maybe@1.0.2", "", {}, "sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ=="],
|
|
81
|
-
|
|
82
|
-
"commander": ["commander@14.0.2", "", {}, "sha512-TywoWNNRbhoD0BXs1P3ZEScW8W5iKrnbithIl0YH+uCmBd0QpPOA8yc82DS3BIE5Ma6FnBVUsJ7wVUDz4dvOWQ=="],
|
|
83
|
-
|
|
84
|
-
"fast-deep-equal": ["fast-deep-equal@3.1.3", "", {}, "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="],
|
|
85
|
-
|
|
86
|
-
"fast-uri": ["fast-uri@3.1.0", "", {}, "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA=="],
|
|
87
|
-
|
|
88
|
-
"js-yaml": ["js-yaml@4.1.1", "", { "dependencies": { "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA=="],
|
|
89
|
-
|
|
90
|
-
"json-schema-traverse": ["json-schema-traverse@1.0.0", "", {}, "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="],
|
|
91
|
-
|
|
92
|
-
"openapi-types": ["openapi-types@12.1.3", "", {}, "sha512-N4YtSYJqghVu4iek2ZUvcN/0aqH1kRDuNqzcycDxhOUpg7GdvLa2F3DgS6yBNhInhv2r/6I0Flkn7CqL8+nIcw=="],
|
|
93
|
-
|
|
94
|
-
"require-from-string": ["require-from-string@2.0.2", "", {}, "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw=="],
|
|
95
|
-
|
|
96
|
-
"undici-types": ["undici-types@7.16.0", "", {}, "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw=="],
|
|
97
|
-
}
|
|
98
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"openapi": "3.0.3",
|
|
3
|
-
"info": { "title": "Array Items API", "version": "1.0.0" },
|
|
4
|
-
"servers": [{ "url": "https://api.example.com" }],
|
|
5
|
-
"paths": {
|
|
6
|
-
"/things": {
|
|
7
|
-
"get": {
|
|
8
|
-
"operationId": "Things.List",
|
|
9
|
-
"tags": ["Things"],
|
|
10
|
-
"parameters": [
|
|
11
|
-
{
|
|
12
|
-
"in": "query",
|
|
13
|
-
"name": "ids",
|
|
14
|
-
"required": false,
|
|
15
|
-
"schema": { "type": "array", "items": { "type": "integer" } }
|
|
16
|
-
}
|
|
17
|
-
],
|
|
18
|
-
"responses": { "200": { "description": "OK" } }
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"openapi": "3.0.3",
|
|
3
|
-
"info": {
|
|
4
|
-
"title": "Auth API",
|
|
5
|
-
"version": "1.0.0"
|
|
6
|
-
},
|
|
7
|
-
"servers": [{ "url": "https://api.example.com" }],
|
|
8
|
-
"components": {
|
|
9
|
-
"securitySchemes": {
|
|
10
|
-
"bearerAuth": {
|
|
11
|
-
"type": "http",
|
|
12
|
-
"scheme": "bearer",
|
|
13
|
-
"bearerFormat": "JWT"
|
|
14
|
-
},
|
|
15
|
-
"apiKeyAuth": {
|
|
16
|
-
"type": "apiKey",
|
|
17
|
-
"in": "header",
|
|
18
|
-
"name": "X-API-Key"
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
"paths": {
|
|
23
|
-
"/ping": {
|
|
24
|
-
"get": {
|
|
25
|
-
"operationId": "Ping.Get",
|
|
26
|
-
"responses": {
|
|
27
|
-
"200": {
|
|
28
|
-
"description": "OK"
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"openapi": "3.0.3",
|
|
3
|
-
"info": {
|
|
4
|
-
"title": "Body API",
|
|
5
|
-
"version": "1.0.0"
|
|
6
|
-
},
|
|
7
|
-
"servers": [{ "url": "https://api.example.com" }],
|
|
8
|
-
"paths": {
|
|
9
|
-
"/contacts": {
|
|
10
|
-
"post": {
|
|
11
|
-
"operationId": "Contacts.Create",
|
|
12
|
-
"tags": ["Contacts"],
|
|
13
|
-
"requestBody": {
|
|
14
|
-
"required": true,
|
|
15
|
-
"content": {
|
|
16
|
-
"application/json": {
|
|
17
|
-
"schema": {
|
|
18
|
-
"type": "object",
|
|
19
|
-
"properties": {
|
|
20
|
-
"name": { "type": "string" }
|
|
21
|
-
},
|
|
22
|
-
"required": ["name"]
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
"application/x-www-form-urlencoded": {
|
|
26
|
-
"schema": {
|
|
27
|
-
"type": "object",
|
|
28
|
-
"properties": {
|
|
29
|
-
"name": { "type": "string" }
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
"responses": {
|
|
36
|
-
"200": { "description": "OK" }
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"openapi": "3.0.3",
|
|
3
|
-
"info": {
|
|
4
|
-
"title": "Collision API",
|
|
5
|
-
"version": "1.0.0"
|
|
6
|
-
},
|
|
7
|
-
"paths": {
|
|
8
|
-
"/contacts": {
|
|
9
|
-
"get": {
|
|
10
|
-
"operationId": "Contacts.List",
|
|
11
|
-
"responses": { "200": { "description": "OK" } }
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"/contacts/search": {
|
|
15
|
-
"get": {
|
|
16
|
-
"operationId": "Contacts.List",
|
|
17
|
-
"responses": { "200": { "description": "OK" } }
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"openapi": "3.0.3",
|
|
3
|
-
"info": {
|
|
4
|
-
"title": "OAuth API",
|
|
5
|
-
"version": "1.0.0"
|
|
6
|
-
},
|
|
7
|
-
"servers": [{ "url": "https://api.example.com" }],
|
|
8
|
-
"security": [
|
|
9
|
-
{
|
|
10
|
-
"oauth": ["read:ping"]
|
|
11
|
-
},
|
|
12
|
-
{}
|
|
13
|
-
],
|
|
14
|
-
"components": {
|
|
15
|
-
"securitySchemes": {
|
|
16
|
-
"oauth": {
|
|
17
|
-
"type": "oauth2",
|
|
18
|
-
"flows": {
|
|
19
|
-
"authorizationCode": {
|
|
20
|
-
"authorizationUrl": "https://example.com/oauth/authorize",
|
|
21
|
-
"tokenUrl": "https://example.com/oauth/token",
|
|
22
|
-
"scopes": {
|
|
23
|
-
"read:ping": "read ping"
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
"clientCredentials": {
|
|
27
|
-
"tokenUrl": "https://example.com/oauth/token",
|
|
28
|
-
"scopes": {
|
|
29
|
-
"read:ping": "read ping",
|
|
30
|
-
"write:ping": "write ping"
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
"paths": {
|
|
38
|
-
"/ping": {
|
|
39
|
-
"get": {
|
|
40
|
-
"operationId": "Ping.Get",
|
|
41
|
-
"security": [
|
|
42
|
-
{
|
|
43
|
-
"oauth": ["read:ping"]
|
|
44
|
-
}
|
|
45
|
-
],
|
|
46
|
-
"responses": {
|
|
47
|
-
"200": {
|
|
48
|
-
"description": "OK"
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"openapi": "3.0.3",
|
|
3
|
-
"info": {
|
|
4
|
-
"title": "Servers API",
|
|
5
|
-
"version": "1.0.0"
|
|
6
|
-
},
|
|
7
|
-
"servers": [
|
|
8
|
-
{
|
|
9
|
-
"url": "https://{region}.api.example.com/{basePath}",
|
|
10
|
-
"description": "Regional server",
|
|
11
|
-
"variables": {
|
|
12
|
-
"region": {
|
|
13
|
-
"default": "us",
|
|
14
|
-
"enum": ["us", "eu"],
|
|
15
|
-
"description": "Region code"
|
|
16
|
-
},
|
|
17
|
-
"basePath": {
|
|
18
|
-
"default": "v1"
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
],
|
|
23
|
-
"paths": {
|
|
24
|
-
"/ping": {
|
|
25
|
-
"get": {
|
|
26
|
-
"operationId": "Ping.Get",
|
|
27
|
-
"responses": {
|
|
28
|
-
"200": {
|
|
29
|
-
"description": "OK"
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
package/fixtures/openapi.json
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"openapi": "3.0.3",
|
|
3
|
-
"info": {
|
|
4
|
-
"title": "Contacts API",
|
|
5
|
-
"version": "1.0.0"
|
|
6
|
-
},
|
|
7
|
-
"servers": [
|
|
8
|
-
{
|
|
9
|
-
"url": "https://api.example.com"
|
|
10
|
-
}
|
|
11
|
-
],
|
|
12
|
-
"paths": {
|
|
13
|
-
"/contacts": {
|
|
14
|
-
"get": {
|
|
15
|
-
"operationId": "Contacts.List",
|
|
16
|
-
"tags": ["Contacts"],
|
|
17
|
-
"summary": "List contacts",
|
|
18
|
-
"parameters": [
|
|
19
|
-
{
|
|
20
|
-
"in": "query",
|
|
21
|
-
"name": "limit",
|
|
22
|
-
"schema": { "type": "integer", "minimum": 1, "maximum": 100 },
|
|
23
|
-
"description": "Max items to return"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"in": "query",
|
|
27
|
-
"name": "tag",
|
|
28
|
-
"schema": { "type": "array", "items": { "type": "string" } },
|
|
29
|
-
"description": "Filter by tags"
|
|
30
|
-
}
|
|
31
|
-
],
|
|
32
|
-
"responses": {
|
|
33
|
-
"200": {
|
|
34
|
-
"description": "OK",
|
|
35
|
-
"content": {
|
|
36
|
-
"application/json": {
|
|
37
|
-
"schema": {
|
|
38
|
-
"type": "array",
|
|
39
|
-
"items": {
|
|
40
|
-
"type": "object",
|
|
41
|
-
"properties": {
|
|
42
|
-
"id": { "type": "string" },
|
|
43
|
-
"name": { "type": "string" }
|
|
44
|
-
},
|
|
45
|
-
"required": ["id", "name"]
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
"/contacts/{id}": {
|
|
55
|
-
"get": {
|
|
56
|
-
"operationId": "Contacts.Get",
|
|
57
|
-
"tags": ["Contacts"],
|
|
58
|
-
"summary": "Get contact",
|
|
59
|
-
"parameters": [
|
|
60
|
-
{
|
|
61
|
-
"in": "path",
|
|
62
|
-
"name": "id",
|
|
63
|
-
"required": true,
|
|
64
|
-
"schema": { "type": "string" }
|
|
65
|
-
}
|
|
66
|
-
],
|
|
67
|
-
"responses": {
|
|
68
|
-
"200": {
|
|
69
|
-
"description": "OK",
|
|
70
|
-
"content": {
|
|
71
|
-
"application/json": {
|
|
72
|
-
"schema": {
|
|
73
|
-
"type": "object",
|
|
74
|
-
"properties": {
|
|
75
|
-
"id": { "type": "string" },
|
|
76
|
-
"name": { "type": "string" }
|
|
77
|
-
},
|
|
78
|
-
"required": ["id", "name"]
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|