acacode / acacode/swagger-typescript-api

any typings using refs to components params

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

Description

Hi,

Codegen in cool ^^, but i have some problem

I'm trying to use next yaml

```
openapi: 3.0.2

components:

schemas:
Employee:
type: object
required:
- id
properties:
id:
type: string
head:
type: object
required:
- id
properties:
id:
$ref: '#/components/schemas/Employee/id'

```
And after generating i have this model

```
export interface Employee {
id?: string;
head?: { id?: any };
}
```

But I think it should turn out like this:

```
export interface Employee {
id?: string;
head?: { id: string };
}
```

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.