-
Notifications
You must be signed in to change notification settings - Fork 585
Description
Describe the bug
I'm working on converting the OpenAPI specification to TypeScript interfaces. I have found some properties are nullable while they should be (potentially) required, e.g., I guess the name and catalog_name of SchemaInfo should be required:
To Reproduce
I'm using openapi-typescript to convert the specification.
Steps to reproduce the behavior:
- npx openapi-typescript /path/to/spec/api.yaml --output /path/to/output/schema.ts
Expected behavior
Some output properties should not be Optional in a typed language like TypeScript.
Additional context
Basically, it’s not that problematic, but when using a typed language, it gets converted to Optional (in TypeScript, fields with a ? suffix), which can be a bit cumbersome during type checking and type guarding. It would be helpful if the OpenAPI spec could include required fields.
