-
-
Notifications
You must be signed in to change notification settings - Fork 232
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
Third call signature not mentioned in the docs #95
Comments
Hi @qm3ster. You're right that the 4-parameter function signature isn't currently documented. I'll add that to my to-do list... or I'm always willing to accept a PR. 😄 Basically, the signature ends up being this:
The last two parameters are optional, so if you're ok with the default options, and you're using Promises instead of callbacks, then your code could look something like this: const mySchema = {
"openapi": "3.0.0",
"info": {
"title": "test api",
"version": "1.2.3",
},
"paths": {
"/": {
"get": {
"responses": {
"200": {
"description": "response"
}
}
}
}
}
};
let result = await dereference("http://example.com/schema.json", mySchema); |
I'm just trying to understand the exhaustive list of what can go in the first parameters.
|
The The |
Yeah, but what is the path doing in that situation? |
The |
Crystal clear, captain! |
I am interested in
used in
bcherny/json-schema-to-typescript
Is there a discussion of this way somewhere?
The text was updated successfully, but these errors were encountered: