Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
$ref support - OAS 2.0 compliant #239
$ref support - OAS 2.0 compliant #239
Changes from all commits
c36683e
a1ebe92
72d2250
adf995e
15a83cb
2aefca1
cba6c78
2bfeb51
1e16a49
76d0eee
4f2a8da
4440425
f1bb6a6
945d99c
61095a6
3f27e12
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we detect if the id is being overridden by something else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe here we can add instance prefix to schema name if it exists? In some cases I guess it could solve some schema conflicts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem here is that onRegister is receiving for all the register so in this case:
For subchild 2 i will read schema 1, 2, 3
For child 1 schema 1 and 2
For root only schema 1
So it will be quite normal to have duplicate and I think it is ok since the
addSchema
already has a check to verify duplicate$id
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean slightly different case.
So if
item
schemas are registered in isolated scopes they will know now nothing about each other. However when you gather all them in shared schema map they will have the same id.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you leave a TODO comment in here? Or open an issue? I think we might want/be able to have a way to get all schemas defined at the current level so you do not get them all here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree and I will describe the case 👍