Closed ChristianHansen closed 3 years ago
Based on this thread it sounds like the current behavior wit the way allOf
is used is intentional and works, but just doesn't line up with what the reference describes.
Created PR https://github.com/LiveRamp/reslang/pull/139
Closing this now that PR #139 is merged.
Marking this as "high" based on my understanding that incorrect OpenAPI specs are being generated. I might just be misunderstanding how unions should work, in which case I'm happy to lower the priority or just make a PR to update the documentation.
Describe The Bug OpenAPI component schemas for unions include a
discriminator
but not theoneOf
property. The Reslang reference suggests thatoneOf
should be used in unions.For example,
Treatment
here was generated from theTreatment
union, but the generated Component Schema doesn't includeoneOf
.To Reproduce
./generate-specs.sh specs-draft/field-mapper
Expected Behavior
I'd expect the
oneOf
keyword (if that's the right term to use) to be present in the outputReslang Version
Master/Latest