You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think that the best way to handle fields title, description and examples is to preserve what is declared in the schema itself and ignore everything coming from allOf items.
If we resolve $refs and run merge, we got title copied from the first type (Developer).
This just makes no sense.
So, I need a custom resolver that could detect whether value comes from parent schema (and keep it) or from items of allOf (and ignore it).
The problem is that it is impossible having current set of arguments resolver is called with.
Please, add a way.
Or, better, make this behavior as default.
The text was updated successfully, but these errors were encountered:
grv87
changed the title
Impossible to write resolver ignoring
Impossible to write resolver ignoring values coming from allOf items
Sep 16, 2019
grv87
changed the title
Impossible to write resolver ignoring values coming from allOf items
Impossible to write resolver that ignores values coming from allOf items
Sep 16, 2019
I see what you are saying, and agree that something like that is needed.
I do not favor making it the default behavior, I think choosing the first is the most straight forward approach.
I think maybe changing the path array to contain the full path to the individual values in different allOf schemas is the way to go. Only worried about backwards compability. Maybe introduce a new variable..
Anyway: I do not currently have too much time to do just that, suggestions are welcome.
I think that the best way to handle fields
title
,description
andexamples
is to preserve what is declared in the schema itself and ignore everything coming fromallOf
items.Consider the following schema:
If we resolve
$ref
s and run merge, we gottitle
copied from the first type (Developer
).This just makes no sense.
So, I need a custom resolver that could detect whether value comes from parent schema (and keep it) or from items of
allOf
(and ignore it).The problem is that it is impossible having current set of arguments resolver is called with.
Please, add a way.
Or, better, make this behavior as default.
The text was updated successfully, but these errors were encountered: