Open
Description
openapi-typescript version
7.8.0
Node.js version
20.17.0
OS + version
15
Description
Description
If we have the field called "summary" in our response, it wouldn't generate types and throwing the error.
TypeError: schemaObject.summary.replace is not a function
Proposal
The response name can be anything and in my humble opinion, we shouldn't check the summary field nested deep inside our 200 responses.
Reproduction
If we have the field/property called "summary" in our response, it wouldn't generate types and throwing the error.
/test:
get:
summary: Test
description: Test
responses:
"200":
description: Example description
content:
application/json:
schema:
type: object
properties:
summary: /* this field will cause the issue */
type: array
Expected result
It should not check only top level summary field.
Required
- My OpenAPI schema is valid and passes the Redocly validator (
npx @redocly/cli@latest lint
)
Extra
- I’m willing to open a PR (see CONTRIBUTING.md)