Path item components are ignored in paths
#1725
Labels
bug
Something isn't working
good first issue
Straightforward problem, solvable for first-time contributors without deep knowledge of the project
openapi-ts
Relevant to the openapi-typescript library
PRs welcome
PRs are welcome to solve this issue!
Description
Hey! First of all, this lib has been great so far! However, it appears that path item components are being ignored in the type
paths
. If only path item components are used,paths
is generated empty:If I add one or more non-component path items,
paths
is generated with those, but component path items are still not included.[No error is shown]
openapi-typescript
7.0.0
20.15.0
Linux Ubuntu + 22.04
Note
A bit of context
I'm the creator of Zimic, an HTTP mocking library with extensive support to TypeScript. As part of our effort to provide type safety, I am integrating openapi-typescript with Zimic as part of zimicjs/zimic#66. The idea is to generate the raw types using openapi-typescript and post-process them to follow Zimic's structure.
Reproduction
Create a file and paste the following schema, which uses path item components. This spec passes the Redocly validator and is valid according to editor.swagger.io.
schema.yaml
Generate the types:
Current result
paths
ignores the component:schema.ts
Expected result
paths
should contain a reference to the component:schema.ts
Let me know if this is an expected behavior or there's any problem with the schema I'm using.
Checklist
npx @redocly/cli@latest lint
)The text was updated successfully, but these errors were encountered: