x-openapi-flow 1.4.1 β†’ 1.4.3

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 +35 -8
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -4,6 +4,7 @@
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/x-openapi-flow?label=npm%20version)](https://www.npmjs.com/package/x-openapi-flow)
6
6
  [![npm downloads](https://img.shields.io/npm/dm/x-openapi-flow?label=npm%20downloads)](https://www.npmjs.com/package/x-openapi-flow)
7
+ ![npm total downloads](https://img.shields.io/npm/dt/x-openapi-flow?style=flat-square)
7
8
  ![node](https://img.shields.io/badge/node-%3E%3D18-339933)
8
9
  ![license](https://img.shields.io/npm/l/x-openapi-flow)
9
10
  [![CI](https://github.com/tiago-marques/x-openapi-flow/actions/workflows/x-openapi-flow-validate.yml/badge.svg)](https://github.com/tiago-marques/x-openapi-flow/actions/workflows/x-openapi-flow-validate.yml)
@@ -14,23 +15,42 @@
14
15
 
15
16
  # OpenAPI describes APIs. x-openapi-flow describes their workflows β€” for developers and AI.
16
17
 
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
+ ![x-openapi-flow in action](https://raw.githubusercontent.com/tiago-marques/x-openapi-flow/main/docs/assets/ezgif.com-animated-gif-maker.gif)
19
+
20
+
21
+ > See your API lifecycle come alive from your OpenAPI spec, with one simple command
22
+
23
+ > Validate, document, and generate flow-aware SDKs automatically.
19
24
 
20
25
  `x-openapi-flow` adds a **declarative state machine** to your OpenAPI spec.
21
26
 
22
27
  Model resource lifecycles, enforce valid transitions, and generate flow-aware artifacts for documentation, SDKs, and automation.
23
28
 
29
+ ## Why This Exists
30
+
31
+ Building APIs is cheap. Building **complex, multi-step APIs that teams actually use correctly** is hard.
32
+
33
+ Teams face recurring problems:
34
+
35
+ - πŸ“„ **Manual documentation is brittle** – OpenAPI specs are static, often out of sync with real workflows
36
+ - πŸ€– **AI agents can hallucinate** – LLMs and code-generating agents may produce invalid calls if workflows are unclear or undocumented
37
+ - 🀯 **Workflows are confusing** – multi-step operations are hard to track for humans and AI agents
38
+ - ⚠️ **Invalid calls slip through** – developers make mistakes because lifecycle rules aren’t enforced
39
+ - ⏱️ **Integration slows down** – SDKs, Postman collections, and docs need constant manual updates
40
+ - πŸ›‘οΈ **Hard to prevent errors in production** – without explicit lifecycle rules, invalid operations can reach live systems, causing outages or inconsistencies
41
+
42
+
43
+ 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**.
24
44
 
25
45
  ## What This Enables
26
46
 
27
47
  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
48
+ - Visualize API lifecycles directly in [Swagger UI](#swagger-ui-demo) and [Redoc](#redoc-demo)
49
+ - Validate flows and state transitions in [CI pipelines](#cli-commands)
50
+ - Generate [lifecycle diagrams automatically](#mermaid-example) from your OpenAPI spec
51
+ - Build [SDKs](#sdk-generation) that understand and respect API workflows
52
+ - Export [Postman](#postman-demo) and [Insomnia](#insomnia-demo) collections organized by lifecycle
53
+ - 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
34
54
 
35
55
  ## Quick Start
36
56
 
@@ -56,6 +76,7 @@ This will:
56
76
 
57
77
  πŸ’‘ Tip: run this in CI to enforce API workflow correctness
58
78
 
79
+ <a id="mermaid-example"></a>
59
80
  ### Real Lifecycle Example
60
81
 
61
82
  Here’s a real-world payment lifecycle represented in x-openapi-flow:
@@ -81,6 +102,7 @@ CAPTURED --> REFUNDED
81
102
 
82
103
  > This visualization makes your API workflow explicit, easy to communicate, and ready for documentation or demos.
83
104
 
105
+ <a id="sdk-generation"></a>
84
106
  ## Generate Flow-Aware SDKs
85
107
 
86
108
  Create a TypeScript SDK that **respects your API’s lifecycle and transition rules**, following best practices seen in leading companies like **Stripe** and **Adyen**:
@@ -129,6 +151,7 @@ See how **x-openapi-flow extends OpenAPI** to make your API workflows explicit,
129
151
 
130
152
  Explore how x-openapi-flow integrates with popular API tools, making lifecycles and flows explicit for documentation and testing.
131
153
 
154
+ <a id="swagger-ui-demo"></a>
132
155
  ### Swagger UI – Visualize Flows in Your Docs
133
156
 
134
157
  ```bash
@@ -144,6 +167,7 @@ npm start
144
167
  ![Swagger UI Flow Lifecycle 2](https://raw.githubusercontent.com/tiago-marques/x-openapi-flow/main/docs/assets/swagger-ui-flow-lifecycle-2.png)
145
168
  > Detailed view of transitions per operation
146
169
 
170
+ <a id="redoc-demo"></a>
147
171
  ### Redoc – Flow-Aware Documentation
148
172
 
149
173
  ```bash
@@ -158,6 +182,7 @@ npm run generate
158
182
  ![Redoc Flow Lifecycle 3](https://raw.githubusercontent.com/tiago-marques/x-openapi-flow/main/docs/assets/redoc-flow-lifecycle-3.png)
159
183
  > Auto-generated lifecycle diagrams make documentation clear and consistent
160
184
 
185
+ <a id="postman-demo"></a>
161
186
  ### Postman – Organized API Collections
162
187
 
163
188
  ```bash
@@ -171,6 +196,7 @@ npm run generate
171
196
  ![Postman Flow Lifecycle 2](https://raw.githubusercontent.com/tiago-marques/x-openapi-flow/main/docs/assets/postman-flow-lifecycle-2.png)
172
197
  > Collections reflect lifecycle order, reducing integration errors
173
198
 
199
+ <a id="insomnia-demo"></a>
174
200
  ### Insomnia – Organized API Collections
175
201
 
176
202
  ```bash
@@ -184,6 +210,7 @@ npm run generate
184
210
  ![Insomnia Flow Lifecycle 2](https://raw.githubusercontent.com/tiago-marques/x-openapi-flow/main/docs/assets/insomnia-flow-lifecycle-2.png)
185
211
  > Requests are pre-organized according to lifecycle transitions
186
212
 
213
+ <a id="cli-commands"></a>
187
214
  ## CLI Reference – Common Commands
188
215
 
189
216
  Use x-openapi-flow from the command line to **manage, validate, visualize, and generate SDKs/docs for your API workflows**.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x-openapi-flow",
3
- "version": "1.4.1",
3
+ "version": "1.4.3",
4
4
  "description": "OpenAPI extension for resource workflow and lifecycle management",
5
5
  "main": "lib/validator.js",
6
6
  "repository": {