-
Notifications
You must be signed in to change notification settings - Fork 45
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
Internal references dereferenced in external files #77
Comments
Ok! That's a good suggestion. I think that similar to #76, it should be possible to do, but I haven't had time to figure that out yet, either. I think today I might actually manage. Thank you! |
So there was a bug #78 that prevented your desired behaviour anyway. With the bug resolved, you'll simply get your request body to contain I think what I can add is something similar to the I'll mark this as a feature request. Shouldn't take too long. |
Hmm. This is a tad more complex, because one might want to install different handlers for different I guess the basics are clear, I'm just trying to come up with a clean design now. |
Hey @jfinkhaeuser, thanks a lot for looking into this! I found out that with the new version, I am not able to use local references in external files at all. If I take the exact example from the original issue description, I get this error:
It works however when I put the Something immediately into the OpenAPI specification instead of the referenced file. That is obviously not semantically correct, because in schema.json I am referencing form schema.json and not from openapi.json. With 0.18.3, this works correctly. |
@tahmidefaz, do you want to go down this rabbit hole and help @jfinkhaeuser with this? |
Thanks. Unfortunately, due to a broken arm, this will have to wait a little. I suspect I can type more than a very slow comment in 1-2 weeks again. |
Oh. 😢 Take care of yourself! |
I'm so sorry guys, I will get into this Real Soon (TM). My arm is better - thank you! - but of course a bunch of paid work piled up, so this project can't take precedence. It shouldn't be too long now, I hope (famous last words...). |
Me and @tahmidefaz came up with an idea of utilizing our upcoming Hackathon week at Red Hat to tackle this. If this goes well, there may a PR appear. We’ll keep you updated! And glad to hear you are recovering! 🙏🏻 |
Just opened a PR in #82 which introduces a new parameter called |
I merged this now. It's not exactly what I had in mind, because I wanted #76 solved as well - but after some time looking at the PR, I figure what I really need is to refactor the core of the resolver a bit before I can provide a clean solution for both. In the meantime, here it is. I'll push a release momentarily. |
@jfinkhaeuser Thank you so much for your help with this! I appreciate it! I will check out the latest release. 👍 |
This is more of an question on whether is this even possible. It applies to a state when resolve_types does not include RESOLVE_INTERNAL. The motivation for this is that it is not possible to have recursive schema definitions in referenced local files. Like:
Expected Behaviour
Local references in external files are kept local. They are injected to the main specification and converted to the new path.
Minimal Example Spec
External file with schema definitions.
Actual Behaviour
Local references in external files are dereferenced. But how? They’d need to be somewhere into the composed specification. Something like:
Steps to Reproduce
Here is a simple script exposing what is dereferenced:
Environment
@jfinkhaeuser
The text was updated successfully, but these errors were encountered: