Commit c2f8655
authored
Fix: Correct handling of identical minItems and maxItems in array schemas when arrayLength option is true (#1784)
* Fix: Correct handling of minItems and maxItems with identical values in array schemas
- Resolved issue where the generated interface was [] when minItems and maxItems were identical
- Now generates a tuple type for such cases
- Added test case for OpenAPI specification with minItems and maxItems set to 2
* chore: run lint fix1 parent c3f4bc4 commit c2f8655
File tree
3 files changed
+27
-2
lines changed- .changeset
- packages/openapi-typescript
- src/transform
- test/transform/schema-object
3 files changed
+27
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
333 | | - | |
334 | | - | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
335 | 341 | | |
336 | 342 | | |
337 | 343 | | |
| |||
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
149 | 163 | | |
150 | 164 | | |
151 | 165 | | |
| |||
0 commit comments