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 +158 -331
- package/adapters/collections/insomnia-adapter.js +211 -15
- package/adapters/collections/postman-adapter.js +195 -15
- package/adapters/ui/redoc/x-openapi-flow-redoc-plugin.js +620 -91
- package/adapters/ui/redoc-adapter.js +132 -5
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -10,96 +10,126 @@
|
|
|
10
10
|
[](https://github.com/tiago-marques/x-openapi-flow/issues)
|
|
11
11
|
[](https://github.com/tiago-marques/x-openapi-flow/commits/main)
|
|
12
12
|

|
|
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
|
-
|
|
17
|
-
|
|
17
|
+

|
|
18
|
+
> Visualizing API lifecycle directly from your OpenAPI spec
|
|
18
19
|
|
|
19
|
-
`x-openapi-flow`
|
|
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
|
-
|
|
27
|
-
`x-openapi-flow` makes flows explicit, so teams can:
|
|
25
|
+
## What This Enables
|
|
28
26
|
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
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
|
-
|
|
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
|
-
|
|
42
|
+
|
|
43
|
+
After regenerating your OpenAPI file, apply and validate the flow (optional):
|
|
44
|
+
|
|
45
45
|
```bash
|
|
46
|
-
npx x-openapi-flow apply openapi.
|
|
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
|
-
|
|
51
|
+
This will:
|
|
50
52
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
- enrich your OpenAPI spec with flow metadata
|
|
54
|
+
- validate lifecycle consistency
|
|
55
|
+
- catch invalid transitions early
|
|
54
56
|
|
|
55
|
-
|
|
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
|
-
|
|
61
|
+
Hereβs a real-world payment lifecycle represented in x-openapi-flow:
|
|
61
62
|
|
|
62
|
-
|
|
63
|
+
```
|
|
64
|
+
CREATED -> AUTHORIZED -> CAPTURED -> REFUNDED
|
|
65
|
+
```
|
|
63
66
|
|
|
64
|
-
|
|
67
|
+
Generate a visual graph of the lifecycle:
|
|
65
68
|
|
|
66
69
|
```bash
|
|
67
|
-
npx x-openapi-flow
|
|
70
|
+
npx x-openapi-flow graph openapi.flow.yaml --format mermaid
|
|
68
71
|
```
|
|
69
72
|
|
|
70
|
-
|
|
73
|
+
Resulting diagram:
|
|
71
74
|
|
|
72
|
-
```
|
|
73
|
-
|
|
75
|
+
```mermaid
|
|
76
|
+
graph TD
|
|
77
|
+
CREATED --> AUTHORIZED
|
|
78
|
+
AUTHORIZED --> CAPTURED
|
|
79
|
+
CAPTURED --> REFUNDED
|
|
74
80
|
```
|
|
75
81
|
|
|
76
|
-
|
|
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
|
|
92
|
+
npx x-openapi-flow generate-sdk openapi.flow.yaml --lang typescript --output ./sdk
|
|
80
93
|
```
|
|
81
94
|
|
|
82
|
-
|
|
95
|
+
Example usage:
|
|
83
96
|
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
97
|
+
```ts
|
|
98
|
+
const payment = await sdk.payments.create({ amount: 1000 });
|
|
99
|
+
await payment.authorize();
|
|
100
|
+
await payment.capture();
|
|
88
101
|
```
|
|
89
102
|
|
|
90
|
-
|
|
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
|
-
|
|
118
|
+
See how **x-openapi-flow extends OpenAPI** to make your API workflows explicit, enforceable, and actionable:
|
|
99
119
|
|
|
100
|
-
|
|
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
|
-
|
|
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
|
-
|
|
112
|
-
|
|
113
|
-
- operation docs enriched with `x-openapi-flow` fields
|
|
114
|
-
- visual lifecycle context while navigating endpoints
|
|
115
|
-
|
|
116
|
-
Demo media:
|
|
141
|
+

|
|
142
|
+
> Lifecycle panel shows valid states and transitions
|
|
117
143
|
|
|
118
|
-
|
|
119
|
-
|
|
144
|
+

|
|
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
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
-
|
|
136
|
-
|
|
137
|
-
Demo media:
|
|
138
|
-
|
|
139
|
-
- GIF slot: `docs/assets/demo-redoc.gif`
|
|
140
|
-
- Image slot: `docs/assets/demo-redoc.png`
|
|
156
|
+

|
|
157
|
+

|
|
158
|
+

|
|
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
|
-
|
|
154
|
-
|
|
155
|
-
|
|
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
|
+

|
|
171
|
+

|
|
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
|
-
|
|
175
|
-
|
|
176
|
-
|
|
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
|
+

|
|
184
|
+

|
|
185
|
+
> Requests are pre-organized according to lifecycle transitions
|
|
183
186
|
|
|
184
|
-
|
|
187
|
+
## CLI Reference β Common Commands
|
|
185
188
|
|
|
186
|
-
|
|
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
|
-
#
|
|
199
|
-
npx x-openapi-flow init
|
|
194
|
+
npx x-openapi-flow help [command] # show help for a specific command
|
|
200
195
|
|
|
201
|
-
|
|
202
|
-
npx x-openapi-flow apply openapi.yaml --out openapi.flow.yaml
|
|
196
|
+
npx x-openapi-flow --help # general help
|
|
203
197
|
|
|
204
|
-
|
|
205
|
-
npx x-openapi-flow diff openapi.yaml --format pretty
|
|
198
|
+
npx x-openapi-flow version # show version
|
|
206
199
|
|
|
207
|
-
#
|
|
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
|
-
|
|
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
|
-
|
|
205
|
+
### Workflow Management
|
|
216
206
|
|
|
217
207
|
```bash
|
|
218
|
-
|
|
219
|
-
npx x-openapi-flow
|
|
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
|
-
|
|
211
|
+
# apply flows to OpenAPI
|
|
212
|
+
npx x-openapi-flow apply [openapi-file] [--flows path] [--out path]
|
|
227
213
|
|
|
228
|
-
|
|
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
|
-
|
|
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
|
-
|
|
293
|
-
|
|
294
|
-
```
|
|
221
|
+
# generate lifecycle diagrams
|
|
222
|
+
npx x-openapi-flow graph [openapi-file] [--format mermaid|json]
|
|
295
223
|
|
|
296
|
-
|
|
224
|
+
# generate Redoc docs
|
|
225
|
+
npx x-openapi-flow generate-redoc [openapi-file] [--output path]
|
|
297
226
|
|
|
298
|
-
|
|
299
|
-
|
|
227
|
+
# export flows
|
|
228
|
+
npx x-openapi-flow export-doc-flows [openapi-file] [--output path] [--format markdown|json]
|
|
300
229
|
```
|
|
301
230
|
|
|
302
|
-
|
|
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
|
-
|
|
234
|
+
# generate flow-aware SDK
|
|
235
|
+
npx x-openapi-flow generate-sdk [openapi-file] --lang typescript [--output path]
|
|
331
236
|
```
|
|
332
237
|
|
|
333
|
-
Full
|
|
238
|
+
Full details:
|
|
334
239
|
|
|
335
|
-
- [
|
|
336
|
-
- [
|
|
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
|
-
|
|
245
|
+
Get the most out of x-openapi-flow with detailed guides, examples, and integration instructions:
|
|
341
246
|
|
|
342
|
-
|
|
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
|
-
-
|
|
345
|
-
|
|
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
|
-
|
|
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
|
-
|
|
353
|
-
|
|
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
|
-
|
|
268
|
+
Weβre actively expanding x-openapi-flow to support multiple platforms and SDKs. Check our progress:
|
|
359
269
|
|
|
360
|
-
-
|
|
361
|
-
|
|
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
|
-
|
|
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
|
-
-
|
|
367
|
-
-
|
|
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
|
-

|
|
384
|
-

|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
464
|
-
- Wiki pages
|
|
465
|
-
- Release notes and changelog entries
|
|
292
|
+
## Documentation Language Policy
|
|
466
293
|
|
|
467
|
-
|
|
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.
|