acacode / acacode/swagger-typescript-api

prefixItems with the same minItems and maxItems value should generate tuples

Open
#285 0 comments 3 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
4.1k
Forks
436
PR merge metrics
No merged PRs in 30d

Description

For example, if we want a list of lat, lon coordinates, this:
```yaml
type: array
items:
type: array
minItems: 2
maxItems: 2
prefixItems:
- number
- number
```
should generate:
```
[number, number][];
```
rather than the current:
```
any[][]
```

----

For now the closest we seem to be able to get is:
```yaml
type: array
items:
type: array
items:
type: number
```
generating:
```
number[][]
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.