-
Notifications
You must be signed in to change notification settings - Fork 157
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
3.0 refs not resolving when the second route points to any ref that is same as first #100
Comments
It sounds like you want to dereference rather than bundle your files. Bundling creates a single file that contains only one copy of each referenced file. All other Dereferencing creates a single file that contains no In Swagger CLI, just pass the |
Thanks @JamesMessinger for the update.
|
Yeah, it was a known bug in Swagger Editor: According to this, it's been fixed. Are you sure you're using the latest version? |
Hey @JamesMessinger thanks for finding that. I'm going to link to it in the issue I opened in swagger-ui here. The problem can be duplicated by pasting the |
@JamesMessinger, so the issue is that I was using With that said, your tool lets users use Is allowing the use of |
Yes, all of my Swagger/OpenAPI libraries allow
As you've noticed, however, this flexibility can lead to compatibility issues with other tools. Some tools only support
|
Hello, I have a strange issue i just ran into and I'm hoping you can help.
I'm using
swagger-parser
6.0.1Below is a full example. In my global.yml i have the following:
Everything for ref for
/errors/item/new
resolves fine. Here is a example of that fileThe problem is the next file does not resolve any refs properly that were being used by the first. In my test, the second file (
/errors/item/edit:
) won't resolve any files that were referenced in the first file.Assume that
/errors/item/edit:
file reference is a duplicate of the first, here is example output when i runswagger-cli bundle global.yml -o openapi_full.yml -t yaml
All the references in the second route are resolving improperly. They end up like
1errors~1item~1new/post/requestBody/content/application~1json/schema/required
instead of resolving the reference.I don't need them to use the same
ref
for anything butschema properties
. If i change the reference file forschema required
andschema example
to be a uniq file that is not used anywhere else, the problem goes away for those, but i need to reuse theschema properties
to get rid of duplicate code. I have the same problem when i moved it into model and tried to reference it there. Am I doing something wrong?The text was updated successfully, but these errors were encountered: