Skip to content

Commit

Permalink
fix default value bug
Browse files Browse the repository at this point in the history
  • Loading branch information
tadelesh committed Jan 16, 2024
1 parent d43457f commit 62cbb60
Show file tree
Hide file tree
Showing 13 changed files with 4,556 additions and 6,052 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ export function transformObjectProperty(propertySchema: Property, codeModel: Cod
type: getTypespecType(propertySchema.schema, codeModel),
decorators: getPropertyDecorators(propertySchema),
fixMe: getFixme(propertySchema, codeModel),
defaultValue: getDefaultValue(propertySchema.schema),
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ model AlertProcessingRuleProperties {
description?: string;

@doc("Indicates if the given alert processing rule is enabled or disabled.")
enabled?: boolean;
enabled?: boolean = true;
}

@doc("Condition to trigger an alert processing rule.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ model AnalysisServicesServerMutableProperties {
ipV4FirewallSettings?: IPv4FirewallSettings;

@doc("How the read-write server's participation in the query pool is controlled.<br/>It can have the following values: <ul><li>readOnly - indicates that the read-write server is intended not to participate in query operations</li><li>all - indicates that the read-write server can participate in query operations</li></ul>Specifying readOnly when capacity is 1 results in error.")
querypoolConnectionMode?: ConnectionMode;
querypoolConnectionMode?: ConnectionMode = ConnectionMode.All;

@doc("The managed mode of the server (0 = not managed, 1 = managed).")
managedMode?: ManagedMode;
Expand Down Expand Up @@ -224,7 +224,7 @@ model CheckServerNameAvailabilityParameters {
name?: string;

@doc("The resource type of azure analysis services.")
type?: string;
type?: string = "Microsoft.AnalysisServices/servers";
}

@doc("The checking result of server name availability.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,7 @@ model PolicyContractProperties {
value: string;

@doc("Format of the policyContent.")
format?: PolicyContentFormat;
format?: PolicyContentFormat = PolicyContentFormat.xml;
}

@doc("Tag contract Properties.")
Expand Down Expand Up @@ -1688,10 +1688,10 @@ model BackendProxyContract {
@doc("Properties controlling TLS Certificate Validation.")
model BackendTlsProperties {
@doc("Flag indicating whether SSL certificate chain validation should be done when using self-signed certificates for this backend host.")
validateCertificateChain?: boolean;
validateCertificateChain?: boolean = true;

@doc("Flag indicating whether SSL certificate name validation should be done when using self-signed certificates for this backend host.")
validateCertificateName?: boolean;
validateCertificateName?: boolean = true;
}

@doc("Backend update parameters.")
Expand Down Expand Up @@ -2075,7 +2075,7 @@ model ApiManagementServiceBackupRestoreParameters {
backupName: string;

@doc("The type of access to be used for the storage account.")
accessType?: AccessType;
accessType?: AccessType = AccessType.AccessKey;

@doc("Storage account access key. Required only if `accessType` is set to `AccessKey`.")
accessKey?: string;
Expand Down Expand Up @@ -2175,7 +2175,7 @@ model ApiManagementServiceBaseProperties {
disableGateway?: boolean;

@doc("The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only.")
virtualNetworkType?: VirtualNetworkType;
virtualNetworkType?: VirtualNetworkType = VirtualNetworkType.None;

@doc("Control Plane Apis version constraint for the API Management service.")
apiVersionConstraint?: ApiVersionConstraint;
Expand Down Expand Up @@ -2775,7 +2775,7 @@ Date of user registration. The date conforms to the following format: `yyyy-MM-d
@doc("User Entity Base Parameters set.")
model UserEntityBaseParameters {
@doc("Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active.")
state?: UserState;
state?: UserState = UserState.active;

@doc("Optional note about a user set by the administrator.")
note?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ model ZoneProperties {
nameServers?: string[];

@doc("The type of this DNS zone (Public or Private).")
zoneType?: DnsZoneType;
zoneType?: DnsZoneType = DnsZoneType.Public;

@doc("A list of references to virtual networks that register hostnames in this DNS zone. This is a only when ZoneType is Private.")
registrationVirtualNetworks?: SubResource[];
Expand Down
Loading

0 comments on commit 62cbb60

Please sign in to comment.