-
-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add external ref support #414
Conversation
@dradetsky Thank you for your comment. |
I don't know much about this specific library except:
|
@horiuchi json-schema-to-typescript uses https://www.npmjs.com/package/json-schema-ref-parser, which is by far the most popular ref parser and supports sub references and external refs. Worth taking a look? |
}); | ||
}); | ||
return Promise.all(files.map(async (file: string) => { | ||
return await SwaggerParser.bundle(file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don’t need/want this “await”?
@silesky Thank you for your information! |
Thank you for raising the discussion. |
Unless I missed something, dtsgen does not currently support refs of the form
I recently made a pr to add this to another library (oazapfts), so as I'm having some trouble with that library, I thought I would do a quick PR which does basically the same thing I did for that library.
I'm not necessarily suggesting this PR should be accepted as-is (although that's up to you). This is just enough for you to confirm it works, so we can discuss what would actually make the PR acceptable.
I think this closes #321 . I'm not totally sure I understand all that guy's requirements w/r/t other directories, but this does resolve a ref like
$ref: './other-dir/extern.yaml#/PartnerInfo'
.