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

fix(gen): add support for Free-form Objects when a schema definitions only specifies type: object #1246

Merged
merged 3 commits into from
May 22, 2024

Conversation

k4n4ry
Copy link
Contributor

@k4n4ry k4n4ry commented May 19, 2024

Fixes #1221
If the target schema does not have AdditionalProperties specified, we treat hasAdditionalProps as true only when both Properties and PatternProperties are absent.

Copy link

codecov bot commented May 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.82%. Comparing base (81d99fa) to head (1c28226).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1246      +/-   ##
==========================================
- Coverage   73.85%   73.82%   -0.04%     
==========================================
  Files         189      189              
  Lines       12807    12809       +2     
==========================================
- Hits         9459     9456       -3     
- Misses       2802     2808       +6     
+ Partials      546      545       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@tdakkota tdakkota left a comment

Choose a reason for hiding this comment

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

LGTM. Could you rebase, please?

Thanks.

@k4n4ry k4n4ry force-pushed the fix/generate-free-form-object branch from e9cb36b to 1c28226 Compare May 22, 2024 06:32
@k4n4ry
Copy link
Contributor Author

k4n4ry commented May 22, 2024

@tdakkota
Thanks for the review. I've rebased the branch.

@tdakkota tdakkota merged commit fd8ab3c into ogen-go:main May 22, 2024
14 checks passed
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.

Incorrect generation of free-form objects
2 participants