x-openapi-flow 1.3.7 β†’ 1.4.1

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