Skip to content
This repository has been archived by the owner on Jul 14, 2023. It is now read-only.

Commit

Permalink
fix bug of ispolysimple
Browse files Browse the repository at this point in the history
  • Loading branch information
qiaozha committed May 26, 2020
1 parent ea8daab commit ec2363e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/plugins/azgenerator/CodeModelAzImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1141,8 +1141,8 @@ export class CodeModelCliImpl implements CodeModelAz {
}

public Parameter_IsPolyOfSimple(param: Parameter = this.MethodParameter): boolean {
if(!isNullOrUndefined(this.MethodParameter['isPolyOfSimple'])) {
return this.MethodParameter['isPolyOfSimple'];
if(!isNullOrUndefined(param['isPolyOfSimple'])) {
return param['isPolyOfSimple'];
}
if (param?.schema?.type == SchemaType.Object && !isNullOrUndefined(param.schema['children']) && !isNullOrUndefined(param.schema['discriminator'])) {
let isSimplePoly = true;
Expand All @@ -1154,9 +1154,9 @@ export class CodeModelCliImpl implements CodeModelAz {
break;
}
if (isSimplePoly) {
this.MethodParameter['isPolyOfSimple'] = true;
param['isPolyOfSimple'] = true;
} else {
this.MethodParameter['isPolyOfSimple'] = false;
param['isPolyOfSimple'] = false;
}
return isSimplePoly;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ hub-and-spoke-topology create a managed-network managed-network-peering-policy.

|Option|Type|Description|Path (SDK)|Path (swagger)|
|------|----|-----------|----------|--------------|
|**--resource-group-name**|string|The name of the resource group.|resource_group_name|
|**--managed-network-name**|string|The name of the Managed Network.|managed_network_name|
|**--policy-name**|string|The name of the Managed Network Peering Policy.|policy_name|
|**--location**|string|The geo-location where the resource lives|location|
Expand All @@ -27,6 +28,7 @@ hub-and-spoke-topology create a managed-network managed-network-peering-policy.

|Option|Type|Description|Path (SDK)|Path (swagger)|
|------|----|-----------|----------|--------------|
|**--resource-group-name**|string|The name of the resource group.|resource_group_name|
|**--managed-network-name**|string|The name of the Managed Network.|managed_network_name|
|**--policy-name**|string|The name of the Managed Network Peering Policy.|policy_name|
|**--location**|string|The geo-location where the resource lives|location|
Expand All @@ -49,6 +51,7 @@ mesh-topology create a managed-network managed-network-peering-policy.

|Option|Type|Description|Path (SDK)|Path (swagger)|
|------|----|-----------|----------|--------------|
|**--resource-group-name**|string|The name of the resource group.|resource_group_name|
|**--managed-network-name**|string|The name of the Managed Network.|managed_network_name|
|**--policy-name**|string|The name of the Managed Network Peering Policy.|policy_name|
|**--location**|string|The geo-location where the resource lives|location|
Expand All @@ -61,6 +64,7 @@ mesh-topology create a managed-network managed-network-peering-policy.

|Option|Type|Description|Path (SDK)|Path (swagger)|
|------|----|-----------|----------|--------------|
|**--resource-group-name**|string|The name of the resource group.|resource_group_name|
|**--managed-network-name**|string|The name of the Managed Network.|managed_network_name|
|**--policy-name**|string|The name of the Managed Network Peering Policy.|policy_name|
|**--location**|string|The geo-location where the resource lives|location|
Expand Down

0 comments on commit ec2363e

Please sign in to comment.