Skip to content

Commit

Permalink
[Hub Generated] Review request for Microsoft.PolicyInsights to add ve…
Browse files Browse the repository at this point in the history
…rsion 2018-07-01-preview (#5408)

* Fix incorrect types

* Transform the type of expressionValue and targetValue to object type for the languages that support a generic object type.
  • Loading branch information
j5lim authored and praries880 committed Apr 11, 2019
1 parent 8da04b8 commit 3875a7a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@
"policyEvaluationDetails": {
"evaluatedExpressions": [
{
"result": "False",
"expression": "name",
"path": "name",
"expressionValue": "myDomainName",
"targetValue": "someName",
"operator": "Equals"
"result": "True",
"expression": "tags",
"path": "tags",
"expressionValue": {},
"targetValue": "global-opco",
"operator": "NotContainsKey"
}
],
"ifNotExistsDetails": {
Expand Down
21 changes: 21 additions & 0 deletions specification/policyinsights/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,13 @@ csharp:
namespace: Microsoft.Azure.Management.PolicyInsights
output-folder: $(csharp-sdks-folder)/PolicyInsights/Management/Management.PolicyInsights/Generated
clear-output-folder: true
directive:
- from: swagger-document
where: $.definitions.ExpressionEvaluationDetails.properties.expressionValue
transform: $.type = "object"
- from: swagger-document
where: $.definitions.ExpressionEvaluationDetails.properties.targetValue
transform: $.type = "object"
```

## Python
Expand All @@ -162,6 +169,13 @@ python:
namespace: azure.mgmt.policyinsights
package-name: azure-mgmt-policyinsights
clear-output-folder: true
directive:
- from: swagger-document
where: $.definitions.ExpressionEvaluationDetails.properties.expressionValue
transform: $.type = "object"
- from: swagger-document
where: $.definitions.ExpressionEvaluationDetails.properties.targetValue
transform: $.type = "object"
```
``` yaml $(python) && $(python-mode) == 'update'
python:
Expand Down Expand Up @@ -190,6 +204,13 @@ namespace: com.microsoft.azure.management.policyinsights
license-header: MICROSOFT_MIT_NO_CODEGEN
payload-flattening-threshold: 1
output-folder: $(azure-libraries-for-java-folder)/azure-mgmt-policyinsights
directive:
- from: swagger-document
where: $.definitions.ExpressionEvaluationDetails.properties.expressionValue
transform: $.type = "object"
- from: swagger-document
where: $.definitions.ExpressionEvaluationDetails.properties.targetValue
transform: $.type = "object"
```

### Java multi-api
Expand Down

0 comments on commit 3875a7a

Please sign in to comment.