Constraint Composite for empty objects inside an allOf #2570
MisterMunchkin
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I ran into a bug where if I had this yaml fragment:
ShiftPayload
It generates this output:
Which isn't ideal because the yaml definition is essentially just trying to turn the 3 fields
end_atjob_idandstart_atinto required fields instead of optional.I think we should handle
requiredconstraints inallOfcompositions! We can updatecollectAllCompositionsin./packages/openapi-typescript/src/transform/schema-object.tsto handle required constraints like so:TDD
Failing test
Tests with new changes:
test/node-api.test.ts > Node.js API > snapshot > DigitalOcean fails but it looks like the actual type composition is still correct.
Related to this issue: #1520
Beta Was this translation helpful? Give feedback.
All reactions