Repository navigation
Conversation
INTER-2457. Regenerated Event as a oneOf wrapper to show the compile break. Do not merge.
|
Following files do not match corresponding templates: To fix this warning, make sure template files are up-to-date, and generate files by running the following command: ./bin/openapi-codegen-docker.sh |
pnpm exec changesetto create a changeset. |
Wrong commit message format detectedWe use Semantic Commit Messages in our project.
Run the next command in the project root to activate local hooks: sh ./install_hooks.shMore info you can find in job logs Commitlint ErrorsCommit: 6fcf7cc `chore: SPIKE Event oneOf discriminated union INTER-2457. Regenerated Event as a oneOf wrapper to show the compile break. Do not merge.`
|
|
This was a prototype done as part of a spike. Closing now, still usable as a reference during the production implementation. |
EventoneOf wrapper (EventDevice|EventEdge, discriminatorsource).Event.UnmarshalJSONinsertssource=devicewhen the key is absent (same as koalaeventsource.HydrateMissing). Never rewritessource:edgeor an existingsource.test/eventhydrate(the rest oftest/still does not compile on this spike).Event, optionalsource) is PR 102.Discussion point: hydrate in UnmarshalJSON
Stock codegen returns
nil(both pointers unset) whensourceis missing. This post-generate edit rematerializes the JSON withsource: devicesoEventDevicerequired-field checks pass and the device pointer is set.Known issue: CI will fail
Examples and tests that read
event.Identificationare expected not to compile. That is the spike.