x-openapi-flow 1.4.0 β†’ 1.4.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.
Files changed (2) hide show
  1. package/README.md +172 -328
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -10,98 +10,144 @@
10
10
  [![open issues](https://img.shields.io/github/issues/tiago-marques/x-openapi-flow)](https://github.com/tiago-marques/x-openapi-flow/issues)
11
11
  [![last commit](https://img.shields.io/github/last-commit/tiago-marques/x-openapi-flow)](https://github.com/tiago-marques/x-openapi-flow/commits/main)
12
12
  ![copilot ready](https://img.shields.io/badge/Copilot-Ready-00BFA5?logo=githubcopilot&logoColor=white)
13
+ > πŸš€ 1,400+ downloads in the first 3 weeks!
13
14
 
14
- # OpenAPI describes APIs.
15
- # x-openapi-flow describes how they actually work β€” for developers and AI.
15
+ # OpenAPI describes APIs. x-openapi-flow describes their workflows β€” for developers and AI.
16
16
 
17
- `x-openapi-flow` is an OpenAPI vendor extension and CLI for documenting and validating resource lifecycle workflows.
18
- It adds explicit state-machine metadata (`x-openapi-flow`) to operations and validates both schema and lifecycle graph consistency.
17
+ ![Swagger UI lifecycle panel with x-openapi-flow](https://raw.githubusercontent.com/tiago-marques/x-openapi-flow/main/docs/assets/swagger-ui-flow-lifecycle.png)
18
+ > Visualizing API lifecycle directly from your OpenAPI spec
19
19
 
20
- ---
20
+ `x-openapi-flow` adds a **declarative state machine** to your OpenAPI spec.
21
21
 
22
- ## Why This Project Matters
22
+ Model resource lifecycles, enforce valid transitions, and generate flow-aware artifacts for documentation, SDKs, and automation.
23
23
 
24
- Most teams document endpoints but not lifecycle behavior. State transitions become implicit, inconsistent, and hard to validate in CI.
25
- `x-openapi-flow` makes flows explicit, so teams can:
24
+ ## Why This Exists
26
25
 
27
- - Validate lifecycle consistency early in CI
28
- - Generate flow-aware docs and diagrams
29
- - Build SDKs that reduce invalid API calls
26
+ Building APIs is cheap. Building **complex, multi-step APIs that teams actually use correctly** is hard.
30
27
 
31
- Result: faster onboarding, fewer integration regressions, and clearer contracts between API producers and consumers.
28
+ Teams face recurring problems:
32
29
 
33
- ---
30
+ - πŸ“„ **Manual documentation is brittle** – OpenAPI specs are static, often out of sync with real workflows
31
+ - πŸ€– **AI agents can hallucinate** – LLMs and code-generating agents may produce invalid calls if workflows are unclear or undocumented
32
+ - 🀯 **Workflows are confusing** – multi-step operations are hard to track for humans and AI agents
33
+ - ⚠️ **Invalid calls slip through** – developers make mistakes because lifecycle rules aren’t enforced
34
+ - ⏱️ **Integration slows down** – SDKs, Postman collections, and docs need constant manual updates
35
+ - πŸ›‘οΈ **Hard to prevent errors in production** – without explicit lifecycle rules, invalid operations can reach live systems, causing outages or inconsistencies
34
36
 
35
- ## TL;DR / Quick Start
36
37
 
37
- From your API project root:
38
+ x-openapi-flow exists to **solve these pains**: it makes lifecycles explicit, validates transitions automatically, and generates flow-aware docs and SDKs β€” **so teams move faster, make fewer mistakes, and ship confident integrations**.
39
+
40
+ ## What This Enables
41
+
42
+ Turn your OpenAPI spec into a single source of truth for API behavior:
43
+ - Visualize API lifecycles directly in [Swagger UI](#swagger-ui-demo) and [Redoc](#redoc-demo)
44
+ - Validate flows and state transitions in [CI pipelines](#cli-commands)
45
+ - Generate [lifecycle diagrams automatically](#mermaid-example) from your OpenAPI spec
46
+ - Build [SDKs](#sdk-generation) that understand and respect API workflows
47
+ - Export [Postman](#postman-demo) and [Insomnia](#insomnia-demo) collections organized by lifecycle
48
+ - Create [AI-ready API contracts](https://github.com/tiago-marques/x-openapi-flow/blob/main/docs/wiki/engineering/AI-Sidecar-Authoring.md) for agentic integrations
49
+
50
+ ## Quick Start
51
+
52
+ Initialize flow support in your project:
38
53
 
39
54
  ```bash
40
55
  npx x-openapi-flow init
41
56
  ```
42
- or
43
- ```bash
44
- npx x-openapi-flow apply openapi.x.yaml
45
- ```
46
57
 
47
- Default adoption path:
58
+ After regenerating your OpenAPI file, apply and validate the flow (optional):
48
59
 
49
- 1. Generate or update your OpenAPI source.
50
- 2. Run `init` to create/sync sidecar flow metadata.
51
- 3. Run `apply` whenever the OpenAPI file is regenerated.
60
+ ```bash
61
+ npx x-openapi-flow apply openapi.yaml --out openapi.flow.yaml
52
62
 
53
- Sidecar and output roles:
63
+ npx x-openapi-flow validate openapi.flow.yaml --profile strict --strict-quality
64
+ ```
54
65
 
55
- - `{context}.x.(json|yaml)`: sidecar source of lifecycle metadata (the file you edit).
56
- - `{context}.flow.(json|yaml)`: generated OpenAPI output after merge (the file you validate and serve in docs/tools).
66
+ This will:
57
67
 
58
- Practical rule:
68
+ - enrich your OpenAPI spec with flow metadata
69
+ - validate lifecycle consistency
70
+ - catch invalid transitions early
59
71
 
60
- 1. edit `.x`
61
- 2. run `apply`
62
- 3. validate/use `.flow`
72
+ πŸ’‘ Tip: run this in CI to enforce API workflow correctness
63
73
 
64
- Full rollout guide: [docs/wiki/getting-started/Adoption-Playbook.md](https://github.com/tiago-marques/x-openapi-flow/blob/main/docs/wiki/getting-started/Adoption-Playbook.md)
65
- Troubleshooting: [docs/wiki/reference/Troubleshooting.md](https://github.com/tiago-marques/x-openapi-flow/blob/main/docs/wiki/reference/Troubleshooting.md)
74
+ <a id="mermaid-example"></a>
75
+ ### Real Lifecycle Example
66
76
 
67
- ---
77
+ Here’s a real-world payment lifecycle represented in x-openapi-flow:
68
78
 
79
+ ```
80
+ CREATED -> AUTHORIZED -> CAPTURED -> REFUNDED
81
+ ```
69
82
 
70
- 1. Bootstrap once per project.
83
+ Generate a visual graph of the lifecycle:
71
84
 
72
85
  ```bash
73
- npx x-openapi-flow init
86
+ npx x-openapi-flow graph openapi.flow.yaml --format mermaid
74
87
  ```
75
88
 
76
- 2. Re-apply sidecar metadata after each OpenAPI regeneration.
89
+ Resulting diagram:
77
90
 
78
- ```bash
79
- npx x-openapi-flow apply openapi.yaml
91
+ ```mermaid
92
+ graph TD
93
+ CREATED --> AUTHORIZED
94
+ AUTHORIZED --> CAPTURED
95
+ CAPTURED --> REFUNDED
80
96
  ```
81
97
 
98
+ > This visualization makes your API workflow explicit, easy to communicate, and ready for documentation or demos.
99
+
100
+ <a id="sdk-generation"></a>
101
+ ## Generate Flow-Aware SDKs
102
+
103
+ Create a TypeScript SDK that **respects your API’s lifecycle and transition rules**, following best practices seen in leading companies like **Stripe** and **Adyen**:
104
+
105
+ - **Orchestrator by model**: each resource exposes methods that enforce valid transitions
106
+ - **Chainable API calls**: perform sequences naturally and safely
107
+
82
108
  ```bash
83
- npx x-openapi-flow validate openapi.flow.yaml --profile strict --strict-quality
109
+ npx x-openapi-flow generate-sdk openapi.flow.yaml --lang typescript --output ./sdk
84
110
  ```
85
111
 
86
- 4. Optional diagnostics for review and troubleshooting.
112
+ Example usage:
87
113
 
88
- ```bash
89
- npx x-openapi-flow diff openapi.yaml --format pretty
90
- npx x-openapi-flow lint openapi.flow.yaml
91
- npx x-openapi-flow graph openapi.flow.yaml --format mermaid
114
+ ```ts
115
+ const payment = await sdk.payments.create({ amount: 1000 });
116
+ await payment.authorize();
117
+ await payment.capture();
92
118
  ```
93
119
 
94
- What this gives your team in practice:
120
+ > This SDK guides developers through valid transition paths, following patterns used by market leaders to ensure safe and intuitive integrations.
121
+
122
+ ## Who Benefits Most
123
+
124
+ x-openapi-flow is ideal for teams and organizations that want **clear, enforceable API workflows**:
125
+
126
+ - **API-first organizations** – maintain a single source of truth for API behavior
127
+ - **Teams building AI agents** – provide AI-friendly contracts and enforce correct API usage, so agents can safely call endpoints in the right order without guessing or violating workflow rules
128
+ - **API platform teams** – ensure consistent lifecycle rules across endpoints
129
+ - **Companies with complex API workflows** – reduce errors and ambiguity in multi-step processes
130
+ - **SDK teams** – generate flow-aware SDKs that guide developers
131
+
132
+
133
+ ## Why x-openapi-flow?
134
+
135
+ See how **x-openapi-flow extends OpenAPI** to make your API workflows explicit, enforceable, and actionable:
95
136
 
96
- - deterministic lifecycle checks in local dev and CI
97
- - explicit transition contracts instead of implicit tribal knowledge
98
- - safer API evolution with fewer integration regressions
137
+ | Capability | OpenAPI | x-openapi-flow |
138
+ | --- | --- | --- |
139
+ | Endpoint contracts | βœ… Yes | βœ… Yes (fully compatible, extended) |
140
+ | Lifecycle states | ❌ No | βœ… Yes – define states for each resource |
141
+ | Transition validation | ❌ No | βœ… Yes – catch invalid calls before runtime |
142
+ | Flow diagrams | ❌ No | βœ… Yes – generate visual lifecycle graphs |
143
+ | Usage guidance (next valid actions) | Limited/manual | βœ… Built-in via lifecycle metadata – guides developers and AI agents |
99
144
 
100
- ## Integration Experience (What You See)
145
+ ## Integration Demos
101
146
 
102
- ### Swagger UI
147
+ Explore how x-openapi-flow integrates with popular API tools, making lifecycles and flows explicit for documentation and testing.
103
148
 
104
- Use this when you want interactive docs with lifecycle context on each operation.
149
+ <a id="swagger-ui-demo"></a>
150
+ ### Swagger UI – Visualize Flows in Your Docs
105
151
 
106
152
  ```bash
107
153
  cd example/swagger-ui
@@ -110,21 +156,14 @@ npm run apply
110
156
  npm start
111
157
  ```
112
158
 
113
- Note: in this example, `npm run apply` prefers local sidecars (`swagger.x.yaml|yml|json`) and falls back to `examples/swagger.x.yaml|json` when a local sidecar is not present.
114
-
115
- Experience outcome:
116
-
117
- - operation docs enriched with `x-openapi-flow` fields
118
- - visual lifecycle context while navigating endpoints
119
-
120
- Demo media:
121
-
122
159
  ![Swagger UI Flow Lifecycle 1](https://raw.githubusercontent.com/tiago-marques/x-openapi-flow/main/docs/assets/swagger-ui-flow-lifecycle.png)
123
- ![Swagger UI Flow Lifecycle 2](https://raw.githubusercontent.com/tiago-marques/x-openapi-flow/main/docs/assets/swagger-ui-flow-lifecycle-2.png)
160
+ > Lifecycle panel shows valid states and transitions
124
161
 
125
- ### Redoc
162
+ ![Swagger UI Flow Lifecycle 2](https://raw.githubusercontent.com/tiago-marques/x-openapi-flow/main/docs/assets/swagger-ui-flow-lifecycle-2.png)
163
+ > Detailed view of transitions per operation
126
164
 
127
- Use this when you want a static docs bundle to share internally or publish.
165
+ <a id="redoc-demo"></a>
166
+ ### Redoc – Flow-Aware Documentation
128
167
 
129
168
  ```bash
130
169
  cd example/redoc
@@ -133,20 +172,13 @@ npm run apply
133
172
  npm run generate
134
173
  ```
135
174
 
136
- Experience outcome:
137
-
138
- - portable `redoc-flow/` package with lifecycle panel
139
- - stable documentation artifact for teams and portals
140
-
141
- Demo media:
142
-
143
175
  ![Redoc Flow Lifecycle 1](https://raw.githubusercontent.com/tiago-marques/x-openapi-flow/main/docs/assets/redoc-flow-lifecycle.png)
144
176
  ![Redoc Flow Lifecycle 2](https://raw.githubusercontent.com/tiago-marques/x-openapi-flow/main/docs/assets/redoc-flow-lifecycle-2.png)
145
177
  ![Redoc Flow Lifecycle 3](https://raw.githubusercontent.com/tiago-marques/x-openapi-flow/main/docs/assets/redoc-flow-lifecycle-3.png)
178
+ > Auto-generated lifecycle diagrams make documentation clear and consistent
146
179
 
147
- ### Postman
148
-
149
- Use this when you want collections aligned with lifecycle transitions.
180
+ <a id="postman-demo"></a>
181
+ ### Postman – Organized API Collections
150
182
 
151
183
  ```bash
152
184
  cd example/postman
@@ -155,19 +187,12 @@ npm run apply
155
187
  npm run generate
156
188
  ```
157
189
 
158
- Experience outcome:
159
-
160
- - flow-oriented Postman collection
161
- - request execution closer to real transition paths
162
-
163
- Demo media:
164
-
165
190
  ![Postman Flow Lifecycle 1](https://raw.githubusercontent.com/tiago-marques/x-openapi-flow/main/docs/assets/postman-flow-lifecycle.png)
166
191
  ![Postman Flow Lifecycle 2](https://raw.githubusercontent.com/tiago-marques/x-openapi-flow/main/docs/assets/postman-flow-lifecycle-2.png)
192
+ > Collections reflect lifecycle order, reducing integration errors
167
193
 
168
- ### Insomnia
169
-
170
- Use this when your team runs API scenarios in Insomnia workspaces.
194
+ <a id="insomnia-demo"></a>
195
+ ### Insomnia – Organized API Collections
171
196
 
172
197
  ```bash
173
198
  cd example/insomnia
@@ -176,297 +201,116 @@ npm run apply
176
201
  npm run generate
177
202
  ```
178
203
 
179
- Experience outcome:
180
-
181
- - generated workspace export with grouped lifecycle requests
182
- - faster onboarding to operation prerequisites and flow order
183
-
184
- Demo media:
185
-
186
204
  ![Insomnia Flow Lifecycle 1](https://raw.githubusercontent.com/tiago-marques/x-openapi-flow/main/docs/assets/insomnia-flow-lifecycle.png)
187
205
  ![Insomnia Flow Lifecycle 2](https://raw.githubusercontent.com/tiago-marques/x-openapi-flow/main/docs/assets/insomnia-flow-lifecycle-2.png)
206
+ > Requests are pre-organized according to lifecycle transitions
188
207
 
189
- ### SDK (TypeScript)
190
-
191
- Use this when you want a generated flow-aware SDK for application integration.
192
-
193
- ```bash
194
- cd example/sdk/typescript
195
- npm install
196
- npm run apply
197
- npm run generate
198
- npm run run:sample
199
- ```
200
-
201
- Experience outcome:
202
-
203
- - generated TypeScript SDK in `sdk/` from `x-openapi-flow` metadata
204
- - minimal runnable sample showing typed SDK usage in `src/sample.ts`
205
- - lifecycle-oriented methods and transition-aware resource instances
206
-
207
- Example project:
208
-
209
- - [example/sdk/typescript/README.md](https://github.com/tiago-marques/x-openapi-flow/blob/main/example/sdk/typescript/README.md)
210
-
211
- More integration details:
212
-
213
- - [docs/wiki/integrations/Swagger-UI-Integration.md](https://github.com/tiago-marques/x-openapi-flow/blob/main/docs/wiki/integrations/Swagger-UI-Integration.md)
214
- - [docs/wiki/integrations/Redoc-Integration.md](https://github.com/tiago-marques/x-openapi-flow/blob/main/docs/wiki/integrations/Redoc-Integration.md)
215
- - [docs/wiki/integrations/Postman-Integration.md](https://github.com/tiago-marques/x-openapi-flow/blob/main/docs/wiki/integrations/Postman-Integration.md)
216
- - [docs/wiki/integrations/Insomnia-Integration.md](https://github.com/tiago-marques/x-openapi-flow/blob/main/docs/wiki/integrations/Insomnia-Integration.md)
217
-
218
- ---
219
-
220
- ## CLI in Practice (Server Workflow)
221
-
222
- Use this sequence as your default lifecycle guardrail in backend projects:
223
-
224
- ```bash
225
- # 1) Bootstrap sidecar from OpenAPI source
226
- npx x-openapi-flow init
227
-
228
- # 2) Merge sidecar into flow-aware OpenAPI output
229
- npx x-openapi-flow apply openapi.yaml --out openapi.flow.yaml
230
-
231
- # 3) Detect drift before commit
232
- npx x-openapi-flow diff openapi.yaml --format pretty
233
-
234
- # 4) Enforce lifecycle quality gates
235
- npx x-openapi-flow validate openapi.flow.yaml --profile strict --strict-quality
236
- npx x-openapi-flow lint openapi.flow.yaml
237
-
238
- # 5) Generate graph artifact for PR discussion
239
- npx x-openapi-flow graph openapi.flow.yaml --format mermaid
240
- ```
241
-
242
- CLI quick references for daily usage:
243
-
244
- ```bash
245
- npx x-openapi-flow help [command]
246
- npx x-openapi-flow <command> --help
247
- npx x-openapi-flow <command> --verbose
248
- npx x-openapi-flow completion [bash|zsh]
249
- ```
208
+ <a id="cli-commands"></a>
209
+ ## CLI Reference – Common Commands
250
210
 
251
- ---
211
+ Use x-openapi-flow from the command line to **manage, validate, visualize, and generate SDKs/docs for your API workflows**.
252
212
 
253
- ## SDK Generation Experience (TypeScript)
254
-
255
- Generate a flow-aware SDK directly from your OpenAPI + `x-openapi-flow` metadata:
213
+ ### General
256
214
 
257
215
  ```bash
258
- npx x-openapi-flow generate-sdk openapi.flow.yaml --lang typescript --output ./sdk
259
- ```
216
+ npx x-openapi-flow help [command] # show help for a specific command
260
217
 
261
- What you get:
218
+ npx x-openapi-flow --help # general help
262
219
 
263
- - resource-centric classes with lifecycle-safe methods
264
- - operation transition awareness (`next_operation_id`, prerequisites, propagated fields)
265
- - reusable client layer for application services
220
+ npx x-openapi-flow version # show version
266
221
 
267
- Typical integration snippet:
222
+ npx x-openapi-flow doctor [--config path] # check setup and config
268
223
 
269
- ```ts
270
- import { FlowApiClient } from "./sdk/src";
271
-
272
- const api = new FlowApiClient({ baseUrl: process.env.API_BASE_URL });
273
-
274
- const payment = await api.payments.create({ amount: 1000 });
275
- await payment.authorize();
276
- await payment.capture();
277
- ```
278
-
279
- ---
280
-
281
- ## Example: Payment Flow
282
-
283
- ```mermaid
284
- graph TD
285
- CreatePayment --> AuthorizePayment
286
- AuthorizePayment --> CapturePayment
287
- CapturePayment --> RefundPayment
288
- ```
289
-
290
- ### Flow-aware SDK Example (TypeScript)
291
-
292
- ```ts
293
- const payment = await sdk.payments.create({ amount: 1000 });
294
- await payment.authorize();
295
- await payment.capture();
296
- await payment.refund();
224
+ npx x-openapi-flow completion [bash|zsh] # enable shell autocompletion
297
225
  ```
298
226
 
299
- At each stage, only valid lifecycle actions should be available.
300
-
301
- ---
302
-
303
- ## Installation
304
-
305
- Install from npm (default):
227
+ ### Workflow Management
306
228
 
307
229
  ```bash
308
- npm install x-openapi-flow
309
- ```
230
+ # initialize flow support
231
+ npx x-openapi-flow init [--flows path] [--force] [--dry-run]
310
232
 
311
- Optional mirror from GitHub Packages:
233
+ # apply flows to OpenAPI
234
+ npx x-openapi-flow apply [openapi-file] [--flows path] [--out path]
312
235
 
313
- ```bash
314
- npm config set @tiago-marques:registry https://npm.pkg.github.com
315
- npm install @tiago-marques/x-openapi-flow
236
+ # validate transitions
237
+ npx x-openapi-flow validate <openapi-file> [--profile core|relaxed|strict] [--strict-quality]
316
238
  ```
317
239
 
318
- If authentication is required, add to `.npmrc`:
319
-
320
- ```ini
321
- //npm.pkg.github.com/:_authToken=${GITHUB_PACKAGES_TOKEN}
322
- ```
323
-
324
- Use a GitHub PAT with `read:packages` (install) and `write:packages` (publish).
325
-
326
- ---
327
-
328
- ## CLI Reference (Selected Commands)
240
+ ### Visualization & Documentation
329
241
 
330
242
  ```bash
331
- npx x-openapi-flow help [command]
332
- npx x-openapi-flow --help
333
- npx x-openapi-flow version
334
- npx x-openapi-flow --version
335
- npx x-openapi-flow validate <openapi-file> [--profile core|relaxed|strict] [--strict-quality]
336
- npx x-openapi-flow init [--flows path] [--force] [--dry-run]
337
- npx x-openapi-flow apply [openapi-file] [--flows path] [--out path]
338
- npx x-openapi-flow analyze [openapi-file] [--format pretty|json] [--out path] [--merge] [--flows path]
339
- npx x-openapi-flow generate-sdk [openapi-file] --lang typescript [--output path]
340
- npx x-openapi-flow export-doc-flows [openapi-file] [--output path] [--format markdown|json]
341
- npx x-openapi-flow generate-redoc [openapi-file] [--output path]
342
- <!-- Demo media removed -->
343
- npx x-openapi-flow doctor [--config path]
344
- npx x-openapi-flow completion [bash|zsh]
345
- ```
243
+ # generate lifecycle diagrams
244
+ npx x-openapi-flow graph [openapi-file] [--format mermaid|json]
346
245
 
347
- Global flag for troubleshooting:
246
+ # generate Redoc docs
247
+ npx x-openapi-flow generate-redoc [openapi-file] [--output path]
348
248
 
349
- ```bash
350
- npx x-openapi-flow <command> --verbose
249
+ # export flows
250
+ npx x-openapi-flow export-doc-flows [openapi-file] [--output path] [--format markdown|json]
351
251
  ```
352
252
 
353
- Full command details:
354
-
355
- - [docs/wiki/reference/CLI-Reference.md](https://github.com/tiago-marques/x-openapi-flow/blob/main/docs/wiki/reference/CLI-Reference.md)
356
- - [x-openapi-flow/README.md](https://github.com/tiago-marques/x-openapi-flow/blob/main/x-openapi-flow/README.md)
357
-
358
- ---
359
-
360
- <!-- Demo media removed -->
361
-
362
- - Auto-detects OpenAPI source files (`openapi.yaml`, `openapi.json`, `swagger.yaml`, etc.)
363
- - Creates or syncs `{context}.x.(json|yaml)` (sidecar with lifecycle metadata)
364
- - Generates `{context}.flow.(json|yaml)` automatically when missing
365
- - In interactive mode, asks before recreating existing flow files
366
- - In non-interactive mode, requires `--force` to recreate when flow file already exists
367
-
368
- Recommended quality gate:
253
+ ### SDK Generation
369
254
 
370
255
  ```bash
371
- npx x-openapi-flow validate openapi.yaml --profile strict
256
+ # generate flow-aware SDK
257
+ npx x-openapi-flow generate-sdk [openapi-file] --lang typescript [--output path]
372
258
  ```
373
259
 
374
- ---
260
+ Full details:
375
261
 
376
- ## Validation Profiles
262
+ - [CLI-Reference.md](https://github.com/tiago-marques/x-openapi-flow/blob/main/docs/wiki/reference/CLI-Reference.md)
263
+ - [README.md](https://github.com/tiago-marques/x-openapi-flow/blob/main/x-openapi-flow/README.md)
377
264
 
378
- - `core`: schema and orphan checks only
379
- <!-- Demo media removed -->
380
- - Schema contract correctness
381
- - Orphan states
382
- - Initial/terminal state structure
383
- - Cycles and unreachable states
384
- - Quality findings (duplicate transitions, invalid refs, non-terminating states)
265
+ ## Documentation and Guides
385
266
 
386
- ---
267
+ Get the most out of x-openapi-flow with detailed guides, examples, and integration instructions:
387
268
 
388
- ## Integrations
269
+ - **Adoption Guide** – [docs/wiki/getting-started/Adoption-Playbook.md](https://github.com/tiago-marques/x-openapi-flow/blob/main/docs/wiki/getting-started/Adoption-Playbook.md)
270
+ Learn how to introduce x-openapi-flow into your API workflow efficiently
389
271
 
390
- - Swagger UI: flow overview + operation-level extension panels
391
- - Redoc: generated package with flow panel
392
- - Postman and Insomnia: generated lifecycle-aware collections/workspaces
393
- - SDK generator: TypeScript available, other languages planned
272
+ - **Troubleshooting** – [docs/wiki/reference/Troubleshooting.md](https://github.com/tiago-marques/x-openapi-flow/blob/main/docs/wiki/reference/Troubleshooting.md)
273
+ Quick solutions to common issues and validation errors
394
274
 
395
- <!-- Demo media removed -->
396
- Integration docs:
275
+ - **Real Examples** – [docs/wiki/engineering/Real-Examples.md](https://github.com/tiago-marques/x-openapi-flow/blob/main/docs/wiki/engineering/Real-Examples.md)
276
+ Explore real OpenAPI specs enhanced with lifecycle metadata
397
277
 
398
- - [docs/wiki/integrations/Swagger-UI-Integration.md](https://github.com/tiago-marques/x-openapi-flow/blob/main/docs/wiki/integrations/Swagger-UI-Integration.md)
399
- ---
400
- ## Copilot Ready (AI Sidecar Authoring)
278
+ - **Integrations**:
279
+ - **Swagger UI** – [docs/wiki/integrations/Swagger-UI-Integration.md](https://github.com/tiago-marques/x-openapi-flow/blob/main/docs/wiki/integrations/Swagger-UI-Integration.md)
280
+ See flow-aware panels in Swagger UI
281
+ - **Redoc** – [docs/wiki/integrations/Redoc-Integration.md](https://github.com/tiago-marques/x-openapi-flow/blob/main/docs/wiki/integrations/Redoc-Integration.md)
282
+ Generate lifecycle diagrams in Redoc documentation
283
+ - **Postman** – [docs/wiki/integrations/Postman-Integration.md](https://github.com/tiago-marques/x-openapi-flow/blob/main/docs/wiki/integrations/Postman-Integration.md)
284
+ Organize collections according to valid transitions
285
+ - **Insomnia** – [docs/wiki/integrations/Insomnia-Integration.md](https://github.com/tiago-marques/x-openapi-flow/blob/main/docs/wiki/integrations/Insomnia-Integration.md)
286
+ Pre-configure requests according to lifecycle flows
401
287
 
402
- Use [llm.txt](https://github.com/tiago-marques/x-openapi-flow/blob/main/llm.txt) as authoring guidance for sidecar population.
288
+ ## Roadmap
403
289
 
404
- Typical AI-assisted loop:
290
+ We’re actively expanding x-openapi-flow to support multiple platforms and SDKs. Check our progress:
405
291
 
406
- 1. `init`
407
- 2. AI fills `{context}.x.(json|yaml)`
408
- 3. `apply`
409
- 4. `validate --profile strict`
292
+ - πŸ—‚ **Roadmap Overview** – [#2](https://github.com/tiago-marques/x-openapi-flow/issues/2)
293
+ See planned features and high-level goals
410
294
 
411
- Prompt template:
295
+ - 🐍 **Python SDK MVP** – [#3](https://github.com/tiago-marques/x-openapi-flow/issues/3)
296
+ Enable Python developers to use flow-aware SDKs
412
297
 
413
- ```text
414
- Use llm.txt from this repository as authoring rules.
415
- Populate {context}.x.(json|yaml) per operationId with coherent lifecycle states and transitions,
416
- including next_operation_id, prerequisite_field_refs, and propagated_field_refs when applicable.
417
- Do not change endpoint paths or HTTP methods.
418
- ```
419
-
420
- ---
421
-
422
- ## Regeneration Workflow
423
-
424
- ```bash
425
- # 1) Generate or update OpenAPI source
426
- # 2) Initialize sidecar metadata
427
- npx x-openapi-flow init
428
- # 3) Edit {context}.x.(json|yaml)
429
- # 4) Re-apply after each OpenAPI regeneration
430
- npx x-openapi-flow apply openapi.x.yaml
431
- ```
432
-
433
- ---
434
-
435
- ## Included Examples
298
+ - 🏎 **Go SDK MVP** – [#4](https://github.com/tiago-marques/x-openapi-flow/issues/4)
299
+ Bring lifecycle-aware SDKs to Go projects
436
300
 
437
- - `payment-api.yaml` (financial)
438
- - `order-api.yaml` (e-commerce/logistics)
439
- - `ticket-api.yaml` (support)
440
- - `quality-warning-api.yaml` (quality warnings)
441
- - `non-terminating-api.yaml` (non-terminating states)
442
-
443
- More examples: [docs/wiki/engineering/Real-Examples.md](https://github.com/tiago-marques/x-openapi-flow/blob/main/docs/wiki/engineering/Real-Examples.md)
444
-
445
- ---
446
-
447
- ## Repository Structure
448
-
449
- - [x-openapi-flow/schema/flow-schema.json](https://github.com/tiago-marques/x-openapi-flow/blob/main/x-openapi-flow/schema/flow-schema.json): extension JSON Schema contract
450
- - [x-openapi-flow/lib/validator.js](https://github.com/tiago-marques/x-openapi-flow/blob/main/x-openapi-flow/lib/validator.js): schema + graph validation engine
451
- - [x-openapi-flow/bin/x-openapi-flow.js](https://github.com/tiago-marques/x-openapi-flow/blob/main/x-openapi-flow/bin/x-openapi-flow.js): CLI entrypoint
452
- - `x-openapi-flow/examples/*.yaml`: sample OpenAPI files
453
- - [.github/workflows/x-openapi-flow-validate.yml](https://github.com/tiago-marques/x-openapi-flow/blob/main/.github/workflows/x-openapi-flow-validate.yml): CI validation example
454
-
455
- ---
301
+ - β˜• **Kotlin SDK MVP** – [#5](https://github.com/tiago-marques/x-openapi-flow/issues/5)
302
+ Support Android and JVM developers with flow-aware SDKs
456
303
 
457
304
  ## Changelog
458
305
 
459
- Version history: [CHANGELOG.md](https://github.com/tiago-marques/x-openapi-flow/blob/main/CHANGELOG.md)
460
- Release notes: [docs/wiki/releases/RELEASE_NOTES_v1.4.0.md](https://github.com/tiago-marques/x-openapi-flow/blob/main/docs/wiki/releases/RELEASE_NOTES_v1.4.0.md)
461
-
462
- ---
306
+ Keep track of updates and improvements in x-openapi-flow:
463
307
 
464
- ## Documentation Language Policy
308
+ - **Version History** – [CHANGELOG.md](https://github.com/tiago-marques/x-openapi-flow/blob/main/CHANGELOG.md)
309
+ Review the full version history and past updates
465
310
 
466
- All project documentation must be written in English, including:
311
+ - **Release Notes** – [docs/wiki/releases/RELEASE_NOTES_v1.4.0.md](https://github.com/tiago-marques/x-openapi-flow/blob/main/docs/wiki/releases/RELEASE_NOTES_v1.4.0.md)
312
+ See detailed notes for the latest release, including new features and fixes
467
313
 
468
- - Repository Markdown files
469
- - Wiki pages
470
- - Release notes and changelog entries
314
+ ## Documentation Language Policy
471
315
 
472
- If a contribution includes non-English documentation content, it should be translated to English before merge.
316
+ To ensure clarity and accessibility for the global developer community, **all project documentation should be written in English**. This helps contributors, users, and AI agents understand and use x-openapi-flow consistently.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x-openapi-flow",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "description": "OpenAPI extension for resource workflow and lifecycle management",
5
5
  "main": "lib/validator.js",
6
6
  "repository": {