Open nginx-nickc opened 1 month ago
Thank you for reporting this @nginx-nickc!
~Looks like an easy fix.~
Well, actually not that easy. Taking into account @MarcelHoell's comment here, it's not clear where we expect the x-
properties to be merged (in certain defined places or everywhere?) and how exactly (do we want to replace the values, or take the first one, or try merging if they are not primitive?).
Thank you for reporting this @nginx-nickc! ~Looks like an easy fix.~ Well, actually not that easy. Taking into account @MarcelHoell's comment here, it's not clear where we expect the
x-
properties to be merged (in certain defined places or everywhere?) and how exactly (do we want to replace the values, or take the first one, or try merging if they are not primitive?).
Might be slightly different scenarios? In this case, the path objects are separate discrete objects that doesn't require "merging" the objects themselves, vs the other case where there are common "info", etc object that requires merging the underlying objects.
Well, it may or may not be a different scenario. There's no guarantee that API descriptions foo
and bar
both contain the same path with different operations but with the same x-
property.
Mentioned that issue to have a broader perspective. The x-
properties could reside on different nodes and require different handling strategies.
Describe the bug
Extension
x-
properties under path properties are removed after "join".To Reproduce Steps to reproduce the behavior:
npx @redocly/cli join ./bar.yaml ./foo.yaml -o test.yaml
Expected behavior
x-foo: true
to be under path/pets/{petId}
.OpenAPI description
OpenAPI test spec from
./__tests__/join/references-in-parameters/
withx-foo: true
added to/pets/{petId}
path in bar.yamlspecs are 3.0
foo.yaml
bar.yaml
Redocly Version(s)
1.14.0
Node.js
Version(s)[v21.7.0]([url]())