Skip to content

Commit

Permalink
Update ManagedNetwork Swagger (#7035)
Browse files Browse the repository at this point in the history
* UpdateManagedNetworkSwagger

* rename required type

* Update readme.md

* Update readme.md
  • Loading branch information
yanfa317 authored and lirenhe committed Aug 28, 2019
1 parent af43231 commit 961312c
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"name": "myManagedNetwork",
"id": "subscriptions/subscriptionA/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetwork/managedNetworks/myManagedNetwork",
"type": "Microsoft.ManagedNetwork/managedNetworks",
"tags": {},
"tags": [],
"location": "eastus",
"properties": {
"provisioningState": "Succeeded",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"name": "myManagedNetwork",
"id": "subscriptions/subscriptionA/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetwork/managedNetworks/myManagedNetwork",
"type": "Microsoft.ManagedNetwork/managedNetworks",
"tags": {},
"tags": [],
"location": "eastus",
"properties": {
"provisioningState": "Succeeded",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"name": "myManagedNetwork",
"id": "subscriptions/subscriptionA/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetwork/managedNetworks/myManagedNetwork",
"type": "Microsoft.ManagedNetwork/managedNetworks",
"tags": {},
"tags": [],
"location": "eastus",
"properties": {
"provisioningState": "Succeeded",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"resourceGroupName": "myResourceGroup",
"managedNetworkName": "myManagedNetwork",
"parameters": {
"tags": {}
"tags": []
}
},
"responses": {
Expand All @@ -15,7 +15,7 @@
"name": "myManagedNetwork",
"id": "subscriptions/subscriptionA/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetwork/managedNetworks/myManagedNetwork",
"type": "Microsoft.ManagedNetwork/managedNetworks",
"tags": {},
"tags": [],
"location": "eastus",
"properties": {
"provisioningState": "Succeeded",
Expand Down Expand Up @@ -66,7 +66,7 @@
"name": "myManagedNetwork",
"id": "subscriptions/subscriptionA/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetwork/managedNetworks/myManagedNetwork",
"type": "Microsoft.ManagedNetwork/managedNetworks",
"tags": {},
"tags": [],
"location": "eastus",
"properties": {
"provisioningState": "Succeeded",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"resourceGroupName": "myResourceGroup",
"managedNetworkName": "myManagedNetwork",
"managedNetwork": {
"tags": {},
"tags": [],
"location": "eastus",
"properties": {
"scope": {
Expand Down Expand Up @@ -52,7 +52,7 @@
"name": "myManagedNetwork",
"id": "subscriptions/subscriptionA/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetwork/managedNetworks/myManagedNetwork",
"type": "Microsoft.ManagedNetwork/managedNetworks",
"tags": {},
"tags": [],
"location": "eastus",
"properties": {
"provisioningState": "Succeeded",
Expand Down Expand Up @@ -103,7 +103,7 @@
"name": "myManagedNetwork",
"id": "subscriptions/subscriptionA/resourceGroups/myResourceGroup/providers/Microsoft.ManagedNetwork/managedNetworks/myManagedNetwork",
"type": "Microsoft.ManagedNetwork/managedNetworks",
"tags": {},
"tags": [],
"location": "eastus",
"properties": {
"provisioningState": "Succeeded",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"properties": {
"provisioningState": "Succeeded",
"etag": "asdf-asdf-asdf2",
"peeringPolicyType": "HubAndSpokeTopology",
"type": "HubAndSpokeTopology",
"hub": {
"id": "/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myHubVnet"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"properties": {
"provisioningState": "Succeeded",
"etag": "asdf-asdf-asdf2",
"peeringPolicyType": "HubAndSpokeTopology",
"type": "HubAndSpokeTopology",
"hub": {
"id": "/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myHubVnet"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"managedNetworkPeeringPolicyName": "myHubAndSpoke",
"managedNetworkPolicy": {
"properties": {
"peeringPolicyType": "HubAndSpokeTopology",
"type": "HubAndSpokeTopology",
"hub": {
"id": "/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myHubVnet"
},
Expand All @@ -29,7 +29,7 @@
"properties": {
"provisioningState": "Succeeded",
"etag": "asdf-asdf-asdf2",
"peeringPolicyType": "HubAndSpokeTopology",
"type": "HubAndSpokeTopology",
"hub": {
"id": "/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myHubVnet"
},
Expand All @@ -49,7 +49,7 @@
"properties": {
"provisioningState": "Succeeded",
"etag": "asdf-asdf-asdf2",
"peeringPolicyType": "HubAndSpokeTopology",
"type": "HubAndSpokeTopology",
"hub": {
"id": "/subscriptionB/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myHubVnet"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,6 @@
"type": "object",
"properties": {
"scope": {
"readOnly": true,
"$ref": "#/definitions/Scope",
"description": "The collection of management groups, subscriptions, virtual networks, and subnets by the Managed Network. This is a read-only property that is reflective of all ScopeAssignments for this Managed Network"
},
Expand All @@ -1012,8 +1011,11 @@
"type": "object",
"properties": {
"tags": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/TagsObject",
"type": "array",
"items": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/TagsObject"
},
"description": "Updates the tags property of the Managed Network"
}
},
Expand Down Expand Up @@ -1230,9 +1232,8 @@
"description": "The Managed Network Peering Policy resource"
},
"ManagedNetworkPeeringPolicyProperties": {
"discriminator": "peeringPolicyType",
"properties": {
"peeringPolicyType": {
"type": {
"type": "string",
"enum": [
"HubAndSpokeTopology",
Expand Down Expand Up @@ -1269,7 +1270,7 @@
}
],
"required": [
"peeringPolicyType"
"type"
],
"description": "Properties of a Managed Network Peering Policy"
},
Expand Down Expand Up @@ -1413,15 +1414,15 @@
"description": "The resource model definition for a ARM tracked top level resource",
"properties": {
"tags": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-ms-mutability": [
"read",
"create",
"update"
],
"type": "array",
"items": {
"type": "string",
"x-ms-mutability": [
"read",
"create",
"update"
]
},
"description": "Resource tags."
},
"location": {
Expand Down Expand Up @@ -1460,10 +1461,7 @@
"description": "Generic pointer to a resource"
},
"TagsObject": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"type": "string",
"description": "Resource tags."
},
"ResourceProperties": {
Expand Down
19 changes: 12 additions & 7 deletions specification/managednetwork/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ openapi-type: arm
tag: package-2019-06-01-preview
```
### Tag: package-2019-03-01-preview
### Tag: package-2019-06-01-preview
These settings apply only when `--tag=package-2019-06-01-preview` is specified on the command line.

Expand All @@ -54,25 +54,31 @@ swagger-to-sdk:
- repo: azure-sdk-for-js
- repo: azure-sdk-for-node
- repo: azure-sdk-for-ruby
after_scripts:
- bundle install && rake arm:regen_all_profiles['azure_mgmt_managed_network']
```

## C#
These settings apply only when `--csharp` is specified on the command line.
Please also specify `--csharp-sdks-folder=<path to "SDKs" directory of your azure-sdk-for-net clone>`.

## Multi-API/Profile support for AutoRest v3 generators
``` yaml $(csharp)
csharp:
azure-arm: true
license-header: MICROSOFT_MIT_NO_VERSION
namespace: Microsoft.Azure.Management.ManagedNetwork
clear-output-folder: true
```

## Multi-API/Profile support for AutoRest v3 generators
AutoRest V3 generators require the use of `--tag=all-api-versions` to select api files.

This block is updated by an automatic script. Edits may be lost!

``` yaml $(tag) == 'all-api-versions' /* autogenerated */
# include the azure profile definitions from the standard location
require: $(this-folder)/../../../profiles/readme.md
# all the input files across all versions
input-file:
- $(this-folder)/Microsoft.ManagedNetwork/preview/2019-06-01-preview/managedNetwork.json
```

If there are files that should not be in the `all-api-versions` set,
Expand All @@ -82,4 +88,3 @@ uncomment the `exclude-file` section below and add the file paths.
#exclude-file:
# - $(this-folder)/Microsoft.Example/stable/2010-01-01/somefile.json
```

0 comments on commit 961312c

Please sign in to comment.