Skip to content

Add support for Union properties - #102

Merged
mikee47 merged 13 commits into
developfrom
feature/union-props
Aug 28, 2026
Merged

Add support for Union properties#102
mikee47 merged 13 commits into
developfrom
feature/union-props

Conversation

@mikee47

@mikee47 mikee47 commented Aug 19, 2026

Copy link
Copy Markdown
Owner

Currently, unions (defined using oneOf) may only contain objects. This PR rectifies that to allow a mix of both Objects and Properties. It also enables selection of the default union tag via the standard default property.

In addition, the default union tag may be specified in the schema via the standard default property. (Currently the default is the first field and cannot be changed.)

The code generator now also checks for duplicate objects/property names within a union and reports an error.

TODO:

  • Support default for properties such that toXXX() configures the appropriate default value. Currently only the union default is applied.
  • Review tests and ensure both streaming import/export are covered
  • Verify tests on esp8266, compare performance and fix any regressions
  • Update documentation

@mikee47 mikee47 mentioned this pull request Aug 20, 2026
1 task
@mikee47
mikee47 force-pushed the feature/union-props branch 9 times, most recently from 6d33369 to 842edbb Compare August 26, 2026 15:26
@mikee47
mikee47 force-pushed the feature/union-props branch 4 times, most recently from f5655cf to 956480f Compare August 28, 2026 06:23
@mikee47
mikee47 force-pushed the feature/union-props branch from 956480f to 71a6e34 Compare August 28, 2026 07:45
@mikee47
mikee47 merged commit 4a9d73e into develop Aug 28, 2026
18 checks passed
@mikee47
mikee47 deleted the feature/union-props branch August 28, 2026 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant