@stdy/cli 0.4.4 → 0.5.0

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 +45 -7
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -55,6 +55,11 @@ Options:
55
55
  --relaxed Log warnings but return responses anyway
56
56
  -h, --help Show help
57
57
 
58
+ Validator Options:
59
+ --validator-strict-oneof Require exactly one oneOf variant to match
60
+ --validator-query-array-format=<fmt> Array query param serialization (see below)
61
+ --validator-query-object-format=<fmt> Object query param serialization (see below)
62
+
58
63
  Generator Options:
59
64
  --generator-array-size=<n> Exact size for all generated arrays
60
65
  --generator-array-min=<n> Minimum array size (default: 1)
@@ -62,6 +67,34 @@ Generator Options:
62
67
  --generator-seed=<n> Seed for deterministic generation (-1 for random)
63
68
  ```
64
69
 
70
+ ### Query Parameter Serialization
71
+
72
+ Steady supports the full OpenAPI 3.x parameter serialization matrix. By default
73
+ (`auto`), Steady reads the `style` and `explode` properties from your OpenAPI
74
+ spec for each parameter. You can override this globally via CLI flags or
75
+ per-request via headers.
76
+
77
+ **Array formats** (`--validator-query-array-format`):
78
+
79
+ | Format | Example | OpenAPI Equivalent |
80
+ | ---------- | ----------------------------- | ------------------------------ |
81
+ | `auto` | Read from spec (default) | - |
82
+ | `repeat` | `colors=red&colors=green` | `style=form, explode=true` |
83
+ | `comma` | `colors=red,green,blue` | `style=form, explode=false` |
84
+ | `space` | `colors=red%20green%20blue` | `style=spaceDelimited` |
85
+ | `pipe` | `colors=red\|green\|blue` | `style=pipeDelimited` |
86
+ | `brackets` | `colors[]=red&colors[]=green` | PHP/Rails style (non-standard) |
87
+
88
+ **Object formats** (`--validator-query-object-format`):
89
+
90
+ | Format | Example | OpenAPI Equivalent |
91
+ | ------------ | ----------------------------------- | --------------------------- |
92
+ | `auto` | Read from spec (default) | - |
93
+ | `flat` | `role=admin&firstName=Alex` | `style=form, explode=true` |
94
+ | `flat-comma` | `id=role,admin,firstName,Alex` | `style=form, explode=false` |
95
+ | `brackets` | `id[role]=admin&id[firstName]=Alex` | `style=deepObject` |
96
+ | `dots` | `id.role=admin&id.firstName=Alex` | Non-standard (SDK compat) |
97
+
65
98
  ### Port Configuration
66
99
 
67
100
  The server port is determined in this order:
@@ -124,13 +157,15 @@ validation errors are logged but responses are still returned.
124
157
 
125
158
  Override server behavior for individual requests:
126
159
 
127
- | Header | Description |
128
- | --------------------- | ------------------------------------------------- |
129
- | `X-Steady-Mode` | Override validation mode: `strict` or `relaxed` |
130
- | `X-Steady-Array-Size` | Override array size (sets both min and max) |
131
- | `X-Steady-Array-Min` | Override minimum array size |
132
- | `X-Steady-Array-Max` | Override maximum array size |
133
- | `X-Steady-Seed` | Override random seed (`-1` for non-deterministic) |
160
+ | Header | Description |
161
+ | ------------------------------ | ------------------------------------------------- |
162
+ | `X-Steady-Mode` | Override validation mode: `strict` or `relaxed` |
163
+ | `X-Steady-Query-Array-Format` | Override array query param serialization format |
164
+ | `X-Steady-Query-Object-Format` | Override object query param serialization format |
165
+ | `X-Steady-Array-Size` | Override array size (sets both min and max) |
166
+ | `X-Steady-Array-Min` | Override minimum array size |
167
+ | `X-Steady-Array-Max` | Override maximum array size |
168
+ | `X-Steady-Seed` | Override random seed (`-1` for non-deterministic) |
134
169
 
135
170
  ```bash
136
171
  # Force strict validation
@@ -141,6 +176,9 @@ curl -H "X-Steady-Array-Size: 50" http://localhost:3000/users
141
176
 
142
177
  # Get random (non-deterministic) responses
143
178
  curl -H "X-Steady-Seed: -1" http://localhost:3000/users
179
+
180
+ # Override query format for SDK testing
181
+ curl -H "X-Steady-Query-Object-Format: dots" "http://localhost:3000/search?filter.level=high"
144
182
  ```
145
183
 
146
184
  ### Response Headers
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stdy/cli",
3
- "version": "0.4.4",
3
+ "version": "0.5.0",
4
4
  "description": "OpenAPI 3 mock server. Validates SDKs against OpenAPI specs with clear error attribution.",
5
5
  "license": "Elastic-2.0",
6
6
  "repository": {
@@ -29,10 +29,10 @@
29
29
  "node": ">=14.0.0"
30
30
  },
31
31
  "optionalDependencies": {
32
- "@stdy/cli-linux-x64": "0.4.4",
33
- "@stdy/cli-linux-arm64": "0.4.4",
34
- "@stdy/cli-darwin-x64": "0.4.4",
35
- "@stdy/cli-darwin-arm64": "0.4.4",
36
- "@stdy/cli-win32-x64": "0.4.4"
32
+ "@stdy/cli-linux-x64": "0.5.0",
33
+ "@stdy/cli-linux-arm64": "0.5.0",
34
+ "@stdy/cli-darwin-x64": "0.5.0",
35
+ "@stdy/cli-darwin-arm64": "0.5.0",
36
+ "@stdy/cli-win32-x64": "0.5.0"
37
37
  }
38
38
  }