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

Don't use a string as the OpenAPI default value for Helm values with an empty object default #1449

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

gcapizzi
Copy link
Contributor

What this PR does / why we need it:

This fixes the translation of empty object Helm default values into OpenAPI. Empty objects were getting the string "{}" as their default, which is not a valid value. We now correctly use {}.

Which issue(s) this PR fixes:

Fixes #1448

Does this PR introduce a user-facing change?

`kctrl`: Helm values with an empty object as their default now get correctly defaulted in OpenAPI.

Additional Notes for your reviewer:

Review Checklist:
  • Follows the developer guidelines
  • Relevant tests are added or updated
  • Relevant docs in this repo added or updated
  • Relevant carvel.dev docs added or updated in a separate PR and there's a link to that PR
  • Code is at least as readable and maintainable as it was before this change

@gcapizzi gcapizzi force-pushed the fix-empty-obj-default branch 2 times, most recently from 190bfff to 014119b Compare January 18, 2024 17:42
@gcapizzi gcapizzi closed this Jan 18, 2024
@gcapizzi gcapizzi reopened this Jan 18, 2024
…an empty object default

This fixes the translation of empty object Helm default values into
OpenAPI. Empty objects were getting the string `"{}"` as their default,
which is not a valid value. We now correctly use `{}`.

Signed-off-by: Giuseppe Capizzi <g.capizzi@gmail.com>
Copy link
Member

@joaopapereira joaopapereira left a comment

Choose a reason for hiding this comment

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

LGTM

@joaopapereira joaopapereira merged commit 899e1a1 into carvel-dev:develop Jan 24, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

kctrl: values with an empty object default in Helm get the string "{}" as a default in OpenAPI
2 participants