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 am encountering errors in the OpenAPI SwaggerUI preview if any schema references another schema more than once. What I mean is if I have more than one property that references the same schema file, I get a Resolver error because it is unable to resolve the reference.
Open the folder containing the 3 files from step 1.
Select the openapi.yaml file.
Open the API Preview (e.g., Shift+Alt+P).
Notice that no errors are shown.
Expand the Product Line schema.
Notice that the top of the preview has Resolver error.
Attempt to expand the second property (i.e., gen2).
Notice that it is unable to render the referenced schema even if it is the same one as the first (gen1) property.
Additional Info
If only one of gen1 or gen2 properties are defined, then it works fine. The example and reproduction shown is a simplified example. This issue was initially discovered with a more complicated setup that also made use of oneOf. This means that the reference does not have to appear in the same file. It can appear anywhere in the tree. For example:
We want to look at the schema for a geometry.
The geometry type is described in a geometry.yaml file and uses oneOf to indicate that it can be either a point, line, or polygon. Each of those types of shapes are defined in their own respective files.
Each shape is defined using position to represent the vertices. The position is defined in its own file.
Because the position type is indirectly referenced multiple times, the same resolver error is encountered.
The text was updated successfully, but these errors were encountered:
There is no update on this unfortunately. We expect to do a next release, probably some time this month and once we done with it I might have time to look at this issue.
Description
I am encountering errors in the OpenAPI SwaggerUI preview if any schema references another schema more than once. What I mean is if I have more than one property that references the same schema file, I get a
Resolver error
because it is unable to resolve the reference.version
4.16.6
OpenAPI file(s)
Steps to reproduce
yaml
files containing the content above.openapi.yaml
file.Shift
+Alt
+P
).Product Line
schema.Resolver error
.gen2
).gen1
) property.Additional Info
If only one of
gen1
orgen2
properties are defined, then it works fine. The example and reproduction shown is a simplified example. This issue was initially discovered with a more complicated setup that also made use ofoneOf
. This means that the reference does not have to appear in the same file. It can appear anywhere in the tree. For example:geometry
.geometry
type is described in ageometry.yaml
file and usesoneOf
to indicate that it can be either apoint
,line
, orpolygon
. Each of those types of shapes are defined in their own respective files.position
to represent the vertices. Theposition
is defined in its own file.position
type is indirectly referenced multiple times, the same resolver error is encountered.The text was updated successfully, but these errors were encountered: