How to work with scheme referencing local files? #950
Unanswered
showmeyourhits
asked this question in
Q&A
Replies: 2 comments
-
After some lurking through the code of this very useful (no sarcasm) tool, I found out that file reference is not supported now - schema-walker.ts only works with http URLs and local refs. So I rephrase the question: what is your plan to supporting it? |
Beta Was this translation helpful? Give feedback.
0 replies
-
I find it unusual that separate spec files are not supported, because this is a very important feature Please let me know how this can be solved? Is this planned to be fixed? Maybe there is a working analogue? Because it is very difficult to keep everything in one spec file |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, everyone 👋
Our team has a habit of extracting common definitions for Swagger in separate file. For example, service can have a private and a public API and they different endpoints, but similar structure.
For example, repo has such structure:
And in swagger defs there will be something like that:
We pass swagger scheme to CLI by URL or absolute fs path:
API client is generated, but there is an issue with it:
a) All the definitions from
common.yaml
are missingb) CLI doesn't say anything about missing files or inability to follow
$ref
.Scheme documentation defines such references as valid - link.
So question is: how to work with such schemas?
We are using OpenAPI 2.0 aka Swagger.
I encountered this problem on
12.0.4
and13.0.22
versions.Beta Was this translation helpful? Give feedback.
All reactions