-
Notifications
You must be signed in to change notification settings - Fork 537
fix Consider refModel's RefFormat then provided refFormat #921
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
Conversation
Format can be different e.g.: INTERNAL, RELATIVE, ...
|
I'm sorry @VIIgit but I still don`t understand the issue. Can you please explain. thanks. |
|
Without the fix, not all references were resolved: Parser's Message returns: By resolving a reference which is referring again a relative linked file then the format "INTERNAL" is used to resolve the reference instead of correct refModel's format "RELATIVE". Without the fix, the provided swagger-root.yaml example doesn't resolve response 201 after the fix the all references are resolved correctly |
|
Will/can this be added to master too? |
|
Please send a PR, will make it faster 👍 |
The exact same data constellation but as OpenApi 3 files and with openApiParser works as expected. So I believe there is no need to add it to the master. |
|
Fair enough, thanks @VIIgit. I did check out this branch and tried to run the tests that you added with Maven but none of the tests in that class seem to be executed. Am I missing something? Your tests cover when the common file has a reference back to the root file. But the scenario I am facing and want to test is when the common file has a reference inside itself. Like this: root.yaml paths:
/employees/{id}:
get:
responses:
404:
$ref: './common.yaml#/responses/notFound'common.yaml responses:
notFound:
description: Not found
schema:
$ref: '#/definitions/error'
definitions:
error:
type: object
properties:
msg:
type: stringI don't think this scenario was covered in your tests but I'm hoping that your fix will take care of this too. |
|
I've tested it only locally and didn't make a pull request. And I also tested your use case positively.👌 |
|
Rock on, thanks!
…On Sat, Nov 17, 2018, 9:24 AM erwin ***@***.*** wrote:
I've tested it only locally and didn't make a pull request.
And I also tested your use case positively.👌
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#921 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKKyWriYlsCX55d9MjcTmHHPi8G_1bDtks5uwCongaJpZM4YYdGq>
.
|
No description provided.