Skip to content

Enable additionalProperties by default #2111

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

Merged
merged 5 commits into from
Aug 16, 2024

Conversation

skarimo
Copy link
Member

@skarimo skarimo commented Aug 15, 2024

Currently, there is some conflicting behavior across multiple code paths. Some code path assumes additionalProperties is false by default where others, it is enabled. For example see:

https://github.com/DataDog/datadog-api-client-python/blob/master/.generator/src/generator/templates/model_utils.j2#L132
and
https://github.com/DataDog/datadog-api-client-python/blob/master/.generator/src/generator/templates/model_utils.j2#L400

To make sure behavior is uniform, lets enabled additionalProperties by default.

@skarimo skarimo requested a review from a team as a code owner August 15, 2024 15:42
@skarimo skarimo force-pushed the sherz/enable-additional-properties branch from e078bd2 to b863e84 Compare August 15, 2024 15:45
Copy link
Contributor

@jack-edmonds-dd jack-edmonds-dd left a comment

Choose a reason for hiding this comment

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

Looks good (assuming all the stuff in */model is the same).

@skarimo skarimo force-pushed the sherz/enable-additional-properties branch from 3c2f782 to b1d07df Compare August 15, 2024 16:12
@skarimo skarimo merged commit 28d5556 into master Aug 16, 2024
13 checks passed
@skarimo skarimo deleted the sherz/enable-additional-properties branch August 16, 2024 13:52
github-actions bot pushed a commit that referenced this pull request Aug 16, 2024
* enable additionalProperties by default

* enabled additionalProps

* reduce change size

* Update .generator/src/generator/templates/model_generic.j2

Co-authored-by: jack-edmonds-dd <[email protected]>

* remove check

---------

Co-authored-by: jack-edmonds-dd <[email protected]> 28d5556
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants