Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bugfix] Fork deepmap/oapi-codegen to fix joinSchema empty interface codegen bug #127

Merged
merged 2 commits into from
Apr 14, 2023

Conversation

IfSentient
Copy link
Contributor

This PR forks deepmap/oapi-codegen into internal/deepmap/oapi-codegen, omitting all packages but pkg/codegen and pkg/util, which are used by thema's go codegen. The fork has been updated with the changes from the PR in oapi-codegen fixing allOf handling, which was the root cause of #124, resulting in any go types generated from joined CUE values ending up as empty interfaces.

Resolves #124

… only pkg/codegen and pkg/util, which thema's go codegen utilizes, and made changes to pkg/codegen based on the unmerged deepmap/oapi-codegen PR (oapi-codegen/oapi-codegen#717) to fix bug where thema go codegen creates empty interfaces for lineages with joinSchema or any joined (&) CUE values.
@sdboyer
Copy link
Contributor

sdboyer commented Apr 13, 2023

cc @AgnesToulet

Copy link
Contributor

@sdboyer sdboyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome. Thanks for doing this!

Could you add a internal/deepmap/UPDATING.md file that at least outlines an expected procedure for updating this, if we need to? Nothing big, but in particular it would be good to have a human-readable list of the changes we've made that need to be preserved.

Also, an additional test case within thema's oapi package that captures the fix for #124 would be helpful.

…'d codegen package to the main one. Added a txtar test for joinSchema.
@IfSentient IfSentient requested a review from sdboyer April 13, 2023 18:59
@sdboyer sdboyer merged commit 080555d into main Apr 14, 2023
1 check passed
@sdboyer
Copy link
Contributor

sdboyer commented Apr 14, 2023

looks excellent, thanks so much for this!

@IfSentient IfSentient deleted the bugfix/124-fix-joinschema-go-codegen branch April 14, 2023 11:57
mildwonkey pushed a commit that referenced this pull request May 1, 2023
…egen

[bugfix] Fork deepmap/oapi-codegen to fix joinSchema empty interface codegen bug
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.

Go codegen using joinSchema creates an empty interface
2 participants