fix(go-sdk): patch date-time fields in nested schemas and allOf - #11
Closed
edg956 wants to merge 2 commits into
Closed
fix(go-sdk): patch date-time fields in nested schemas and allOf#11edg956 wants to merge 2 commits into
edg956 wants to merge 2 commits into
Conversation
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
|
The Go checkstyle failed. Please run You can also run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
patchDateTimeToEpochMillisandpatchBareObjectspreviously only walked one level ofproperties, missing fields insideallOf/anyOf/oneOfand nested inline objects. Fields likestartDate/endDatewere left as*time.Timein generated code, causing unmarshal failures with epoch-millis values from the API.walkSchemarecursive visitor that traverses the full JSON tree; both patch functions now use it.scripts/patch_swagger_test.gocovering flat properties, nested inline objects,allOf, array items, and the non-bare-object guard.Test plan
go test ./scripts/ -v— all 7 patch script tests passgo test ./pkg/ometa/ -v— unit tests passmodels.goagainst a real swagger spec and confirm no*time.Timefields remain🤖 Generated with Claude Code