@ts-pf/openapi 0.5.0 → 0.5.2

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
@@ -66,6 +66,8 @@ const spec = openapi(catalog(contract, { prefix: '/rpc' }), {
66
66
  })
67
67
  ```
68
68
 
69
+ Use the generator for models only and write the call layer yourself: generated REST clients read the outcome from the HTTP status, which is wrong for ts-pf. The guide [Clients in other languages](https://github.com/crobinson42/ts-pf/blob/main/docs/other-languages.md) walks through it.
70
+
69
71
  The profile describes the same POST JSON RPC paths and envelopes: no GET, no path params, no REST. It sets the options below to their `codegen` column (`streams`, `enumNames`, and `catalogHash` are never set by the profile). Each one can also be set alone, and an option you pass yourself wins over the profile (`{ profile: 'codegen', naming: 'path' }` keeps dotted names).
70
72
 
71
73
  | Option | Default | `codegen` | Effect |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ts-pf/openapi",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "description": "Opt-in OpenAPI 3.1 document from catalog() (POST JSON RPC)",
5
5
  "keywords": [
6
6
  "ts-pf",
@@ -49,11 +49,11 @@
49
49
  "lint": "biome check src tests"
50
50
  },
51
51
  "dependencies": {
52
- "@ts-pf/docs": "0.5.0"
52
+ "@ts-pf/docs": "0.5.2"
53
53
  },
54
54
  "devDependencies": {
55
- "@ts-pf/contract": "0.5.0",
56
- "@ts-pf/stream": "0.5.0",
55
+ "@ts-pf/contract": "0.5.2",
56
+ "@ts-pf/stream": "0.5.2",
57
57
  "typebox": "^1.4.6",
58
58
  "zod": "^4.0.0"
59
59
  }
@@ -44,7 +44,7 @@ Post-processing by component name? Use these names; older versions emitted `<pat
44
44
 
45
45
  ## Codegen profile (non-TypeScript generators)
46
46
 
47
- For openapi-generator, Kiota, orval, or swagger_parser, pass `profile: 'codegen'` instead of writing a post-processor. It is still POST JSON RPC (no GET, path params, or REST):
47
+ For openapi-generator, Kiota, orval, or swagger_parser, pass `profile: 'codegen'` instead of writing a post-processor. It is still POST JSON RPC (no GET, path params, or REST). Generate models only; the client writes a thin call layer that classifies by envelope, not HTTP status (guide: [Clients in other languages](https://github.com/crobinson42/ts-pf/blob/main/docs/other-languages.md)):
48
48
 
49
49
  ```ts
50
50
  import { catalog } from '@ts-pf/docs'