You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The response fields are not marked as required thus creating | undefined types in code generation tools
Expected
For example, the tag definition:
tag:
title: Tag
type: object
x-tags:
- Tags
description: A tag allows you to label your contacts, companies, and conversations
and list them using that tag.
properties:
type:
type: string
description: value is "tag"
example: tag
id:
type: string
description: The id of the tag
example: '123456'
name:
type: string
description: The name of the tag
example: Test tag
applied_at:
type: integer
format: date-time
description: The time when the tag was applied to the object
example: 1663597223
applied_by:
"$ref": "#/components/schemas/reference"
should be:
tag:
title: Tag
type: object
x-tags:
- Tags
description: A tag allows you to label your contacts, companies, and conversations
and list them using that tag.
properties:
type:
type: string
required: true
description: value is "tag"
example: tag
id:
type: string
required: true
description: The id of the tag
example: '123456'
name:
type: string
required: true
description: The name of the tag
example: Test tag
applied_at:
required: true
type: integer
format: date-time
description: The time when the tag was applied to the object
example: 1663597223
applied_by:
required: true
"$ref": "#/components/schemas/reference"
Schema Inaccuracy
The response fields are not marked as required thus creating
| undefined
types in code generation toolsExpected
For example, the tag definition:
should be:
Reproduction Steps
Please see attached conversation
openapi-ts/openapi-typescript#1422 (comment)
And repro repo
https://github.com/cipriancaba/openapi-typescript
The text was updated successfully, but these errors were encountered: