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 JSON-encode provider config #1308

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Don't JSON-encode provider config
blampe committed Jan 11, 2024
commit 89a57915387554b56e643bb5fc3b6f11b8f5dd60
12 changes: 0 additions & 12 deletions pkg/codegen/java/gen.go
Original file line number Diff line number Diff line change
@@ -435,18 +435,6 @@ func (pt *plainType) genInputProperty(ctx *classFileContext, prop *schema.Proper
if prop.IsRequired() {
attributeArgs = ", required=true"
}
if pt.res != nil && pt.res.IsProvider {
pType := codegen.UnwrapType(prop.Type)
json := true
if pType == schema.StringType {
json = false
} else if t, ok := pType.(*schema.TokenType); ok && t.UnderlyingType == schema.StringType {
json = false
}
if json {
attributeArgs += ", json=true"
}
}

const indent = " "
genPropJavadoc(ctx, prop, propJavadocOptions{
Original file line number Diff line number Diff line change
@@ -18,14 +18,14 @@ public final class ProviderArgs extends com.pulumi.resources.ResourceArgs {

public static final ProviderArgs Empty = new ProviderArgs();

@Import(name="cacheEnabled", json=true)
Copy link
Member

Choose a reason for hiding this comment

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

Reminder here to remove json from the ImportAnnotation or at least mark deprecated.

@Import(name="cacheEnabled")
private @Nullable Output<Boolean> cacheEnabled;

public Optional<Output<Boolean>> cacheEnabled() {
return Optional.ofNullable(this.cacheEnabled);
}

@Import(name="config", json=true)
@Import(name="config")
private @Nullable Output<ProviderConfigArgs> config;

public Optional<Output<ProviderConfigArgs>> config() {
@@ -58,7 +58,7 @@ public Optional<Output<String>> edgerc() {
* The maximum number of API requests to be made per second (0 for no limit)
*
*/
@Import(name="requestLimit", json=true)
@Import(name="requestLimit")
private @Nullable Output<Integer> requestLimit;

/**
Original file line number Diff line number Diff line change
@@ -51,7 +51,7 @@ public Optional<Output<String>> context() {
* Options for tuning the Kubernetes client used by a Provider.
*
*/
@Import(name="kubeClientSettings", json=true)
@Import(name="kubeClientSettings")
private @Nullable Output<KubeClientSettingsArgs> kubeClientSettings;

/**
Original file line number Diff line number Diff line change
@@ -25,14 +25,14 @@ public Optional<Output<String>> name() {
return Optional.ofNullable(this.name);
}

@Import(name="populated", json=true)
@Import(name="populated")
private @Nullable Output<Boolean> populated;

public Optional<Output<Boolean>> populated() {
return Optional.ofNullable(this.populated);
}

@Import(name="radiusKm", json=true)
@Import(name="radiusKm")
private @Nullable Output<Double> radiusKm;

public Optional<Output<Double>> radiusKm() {