@codewithagents/openapi-server 1.6.0 → 1.8.0

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 CHANGED
@@ -26,7 +26,7 @@ pnpm add -D @codewithagents/openapi-server
26
26
  npm install -D @codewithagents/openapi-server
27
27
  ```
28
28
 
29
- Requires [`@codewithagents/openapi-gen`](../openapi-gen). Run both generators together.
29
+ Requires [`openapi-zod-ts`](../openapi-zod-ts). Run both generators together.
30
30
 
31
31
  ---
32
32
 
@@ -55,10 +55,10 @@ npx openapi-server
55
55
  | `service.ts` | TypeScript interface, one method per API operation |
56
56
  | `router.ts` | `createRouter(service)` factory, mounts every route on a Hono app |
57
57
 
58
- Run `openapi-gen` first (or together) so `models.ts` exists before `service.ts` imports from it:
58
+ Run `openapi-zod-ts` first (or together) so `models.ts` exists before `service.ts` imports from it:
59
59
 
60
60
  ```bash
61
- npx openapi-gen && npx openapi-server
61
+ npx openapi-zod-ts && npx openapi-server
62
62
  ```
63
63
 
64
64
  Or add to `package.json`:
@@ -66,7 +66,7 @@ Or add to `package.json`:
66
66
  ```json
67
67
  {
68
68
  "scripts": {
69
- "generate": "openapi-gen && openapi-server"
69
+ "generate": "openapi-zod-ts && openapi-server"
70
70
  }
71
71
  }
72
72
  ```
@@ -241,7 +241,7 @@ Relative paths in the config resolve from the config file's directory.
241
241
 
242
242
  See the [Zod validation](https://openapi.codewithagents.de/openapi-server#zod-validation-input_schema) section in the docs for the two-pass generation flow and schema naming convention.
243
243
 
244
- Point `input_schema` at the same `schemas.ts` you use with `@codewithagents/openapi-gen`. The server generator adds runtime validation to every route that receives a request body:
244
+ Point `input_schema` at the same `schemas.ts` you use with `openapi-zod-ts`. The server generator adds runtime validation to every route that receives a request body:
245
245
 
246
246
  **Config:**
247
247
 
@@ -278,7 +278,7 @@ Invalid requests get a structured `422` response instead of reaching your servic
278
278
  }
279
279
  ```
280
280
 
281
- **Same schemas, both sides of the wire**: `openapi-gen` validates outgoing requests in the browser; `openapi-server` validates incoming requests on the server. One `schemas.ts`, one source of truth.
281
+ **Same schemas, both sides of the wire**: `openapi-zod-ts` validates outgoing requests in the browser; `openapi-server` validates incoming requests on the server. One `schemas.ts`, one source of truth.
282
282
 
283
283
  **Drift detection**: if schemas diverge from the spec (extra schema, missing schema), the generator warns to stderr. Builds still succeed; the warning is advisory.
284
284
 
@@ -1,4 +1,4 @@
1
- import { type CliAction } from '@codewithagents/openapi-gen/cli-core';
1
+ import { type CliAction } from 'openapi-zod-ts/cli-core';
2
2
  export type { CliAction };
3
3
  /**
4
4
  * Parse raw process.argv into a structured action.
@@ -1 +1 @@
1
- {"version":3,"file":"cli-args.d.ts","sourceRoot":"","sources":["../src/cli-args.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAoB,MAAM,sCAAsC,CAAA;AAEvF,YAAY,EAAE,SAAS,EAAE,CAAA;AAIzB;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,SAAS,CAEnE"}
1
+ {"version":3,"file":"cli-args.d.ts","sourceRoot":"","sources":["../src/cli-args.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAoB,MAAM,yBAAyB,CAAA;AAE1E,YAAY,EAAE,SAAS,EAAE,CAAA;AAIzB;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,SAAS,CAEnE"}
package/dist/cli-args.js CHANGED
@@ -1,4 +1,4 @@
1
- import { parseBaseCliArgs } from '@codewithagents/openapi-gen/cli-core';
1
+ import { parseBaseCliArgs } from 'openapi-zod-ts/cli-core';
2
2
  const USAGE = 'Usage: openapi-server [--config <path-to-config.json>]';
3
3
  /**
4
4
  * Parse raw process.argv into a structured action.
@@ -1 +1 @@
1
- {"version":3,"file":"cli-args.js","sourceRoot":"","sources":["../src/cli-args.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,gBAAgB,EAAE,MAAM,sCAAsC,CAAA;AAIvF,MAAM,KAAK,GAAG,wDAAwD,CAAA;AAEtE;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAAC,IAAc,EAAE,GAAW;IACtD,OAAO,gBAAgB,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAA;AAC3C,CAAC"}
1
+ {"version":3,"file":"cli-args.js","sourceRoot":"","sources":["../src/cli-args.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAI1E,MAAM,KAAK,GAAG,wDAAwD,CAAA;AAEtE;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAAC,IAAc,EAAE,GAAW;IACtD,OAAO,gBAAgB,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAA;AAC3C,CAAC"}