Skip to content

The "requestBody" in generated api is always optional #2417

@StasTelnov

Description

@StasTelnov

openapi-typescript version

7.9.1

Node.js version

20.19.4

OS + version

ALT Linux 11

Description

The "requestBody" in generated api is always optional so I cannot access to requestBody members:

Image Image

Reproduction

  1. Generate api
  2. Try to get access to any requestBody's member

Expected result

All requestBodies are NOT optional

Required

  • My OpenAPI schema is valid and passes the Redocly validator (npx @redocly/cli@latest lint)

Extra

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingopenapi-tsRelevant to the openapi-typescript library

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions