You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
v6 supports remote schemas; this may just be a small bug in this specific scenario. Will investigate.
Also give v7 (openapi-typescript@next) a try and see if that works for you. Schema resolution has been greatly improved (and would love any feedback / bug reports / encountered issues if you do try that)
Strange—I copied & pasted your exact schemas and I was not able to reproduce your error (on Node 18.12 as well as Node 20). I was seeing the file generate correctly. Maybe there’s something else going on that’s not captured in your reproduction (which was very helpful by the way, but I think there’s another issue here)?
It's similar for my problem. I have remote root yaml, but referenced yaml doesn't show their types. Bumped to 6.7.0 export interface paths { '/foo': external['paths/foo-api/foo-api.yaml'] }
In v7 next.2 it gives me types.Buy have strange things like '/foo': { parameters: { query?: never header?: never path?: never cookie?: never } /** Search for Foo */
@omgpiu sometimes the unknown can stem from a hard-to-find syntax error, such as accidentally omitting the schema key in the response. And 6.x does not validate your schema, so it won’t tell you if there are any issues.
7.x generates more nevers on purpose (explanation). The fact that both versions fail seem like it’s a syntax issue. But maybe it’s a bug. Would have to see your full schema to be sure.
Description
Relative referenced yaml files results in a never type.
openapi-typescript
latest
(npx)18.12.1
macOS 13.4.1
Reproduction
foo.yaml
bar.yaml
cli command
Expected result
schema.d.ts
where
external["bar.yaml"]["components"]["schemas"]["User"]
is a normal type.Actual result
schema.d.ts
Checklist
npx @redocly/cli@latest lint
)So, is it possible to handle types in
bar.yml
?The text was updated successfully, but these errors were encountered: