x-openapi-flow 1.4.1 β†’ 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 +28 -6
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -21,16 +21,31 @@
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 Exists
25
+
26
+ Building APIs is cheap. Building **complex, multi-step APIs that teams actually use correctly** is hard.
27
+
28
+ Teams face recurring problems:
29
+
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
36
+
37
+
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**.
24
39
 
25
40
  ## What This Enables
26
41
 
27
42
  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
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
34
49
 
35
50
  ## Quick Start
36
51
 
@@ -56,6 +71,7 @@ This will:
56
71
 
57
72
  πŸ’‘ Tip: run this in CI to enforce API workflow correctness
58
73
 
74
+ <a id="mermaid-example"></a>
59
75
  ### Real Lifecycle Example
60
76
 
61
77
  Here’s a real-world payment lifecycle represented in x-openapi-flow:
@@ -81,6 +97,7 @@ CAPTURED --> REFUNDED
81
97
 
82
98
  > This visualization makes your API workflow explicit, easy to communicate, and ready for documentation or demos.
83
99
 
100
+ <a id="sdk-generation"></a>
84
101
  ## Generate Flow-Aware SDKs
85
102
 
86
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**:
@@ -129,6 +146,7 @@ See how **x-openapi-flow extends OpenAPI** to make your API workflows explicit,
129
146
 
130
147
  Explore how x-openapi-flow integrates with popular API tools, making lifecycles and flows explicit for documentation and testing.
131
148
 
149
+ <a id="swagger-ui-demo"></a>
132
150
  ### Swagger UI – Visualize Flows in Your Docs
133
151
 
134
152
  ```bash
@@ -144,6 +162,7 @@ npm start
144
162
  ![Swagger UI Flow Lifecycle 2](https://raw.githubusercontent.com/tiago-marques/x-openapi-flow/main/docs/assets/swagger-ui-flow-lifecycle-2.png)
145
163
  > Detailed view of transitions per operation
146
164
 
165
+ <a id="redoc-demo"></a>
147
166
  ### Redoc – Flow-Aware Documentation
148
167
 
149
168
  ```bash
@@ -158,6 +177,7 @@ npm run generate
158
177
  ![Redoc Flow Lifecycle 3](https://raw.githubusercontent.com/tiago-marques/x-openapi-flow/main/docs/assets/redoc-flow-lifecycle-3.png)
159
178
  > Auto-generated lifecycle diagrams make documentation clear and consistent
160
179
 
180
+ <a id="postman-demo"></a>
161
181
  ### Postman – Organized API Collections
162
182
 
163
183
  ```bash
@@ -171,6 +191,7 @@ npm run generate
171
191
  ![Postman Flow Lifecycle 2](https://raw.githubusercontent.com/tiago-marques/x-openapi-flow/main/docs/assets/postman-flow-lifecycle-2.png)
172
192
  > Collections reflect lifecycle order, reducing integration errors
173
193
 
194
+ <a id="insomnia-demo"></a>
174
195
  ### Insomnia – Organized API Collections
175
196
 
176
197
  ```bash
@@ -184,6 +205,7 @@ npm run generate
184
205
  ![Insomnia Flow Lifecycle 2](https://raw.githubusercontent.com/tiago-marques/x-openapi-flow/main/docs/assets/insomnia-flow-lifecycle-2.png)
185
206
  > Requests are pre-organized according to lifecycle transitions
186
207
 
208
+ <a id="cli-commands"></a>
187
209
  ## CLI Reference – Common Commands
188
210
 
189
211
  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.2",
4
4
  "description": "OpenAPI extension for resource workflow and lifecycle management",
5
5
  "main": "lib/validator.js",
6
6
  "repository": {