Error Generating Types with openapi-typescript

Issue Description: Running the command bunx openapi-typescript --make-paths-enum --immutable results in the following error:
Error: #/paths/~1sign-in~1social/post/responses/200/content/application~1json: invalid property required. Expected Schema Object, got Array
Error: #/paths/~1sign-in~1social/post/responses/200/content/application~1json: invalid property required. Expected Schema Object, got Array
Steps to Reproduce: 1. Execute the above command. 2. Observe the error in the console. Relevant OpenAPI Specification:
paths:
/sign-in/social:
post:
responses:
'200':
description: Successful response
content:
application/json:
required:
- token
paths:
/sign-in/social:
post:
responses:
'200':
description: Successful response
content:
application/json:
required:
- token
Note: The required property is placed directly under content, which is likely causing the error. Expected Behavior: The command should generate TypeScript types without errors. Additional Information: - openapi-typescript version: [specify version] - Operating System: [specify OS] - Node.js version: [specify version] Attempted Solutions: Tried moving the required property inside a schema object, but would like confirmation if this is the correct approach. Any assistance or suggestions to resolve this issue would be greatly appreciated.
No description
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?