Skip to content

Commit

Permalink
MSI: Use common types. Fix definitions for proper .NET SDK generation. (
Browse files Browse the repository at this point in the history
Azure#8352)

* Use common types. Fix definitions for proper .NET SDK generation.

* Use tracked and proxy resource types

* Revert reference of IdentityPatch to Identity resource

* Revert the previous revert
  • Loading branch information
angosms authored and josuh committed Mar 4, 2020
1 parent 4ed767a commit c2246b9
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 118 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -351,88 +351,59 @@
}
},
"definitions": {
"Resource": {
"properties": {
"id": {
"type": "string",
"readOnly": true,
"description": "The id of the resource."
},
"name": {
"type": "string",
"readOnly": true,
"description": "The name of the resource."
},
"location": {
"type": "string",
"description": "The Azure region where the resource lives."
}
},
"x-ms-azure-resource": true,
"description": "Describes common properties of a resource."
},
"Identity": {
"properties": {
"tags": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Resource tags"
},
"properties": {
"x-ms-client-flatten": true,
"readOnly": true,
"description": "The properties associated with the identity.",
"$ref": "#/definitions/IdentityProperties"
},
"type": {
"type": "string",
"readOnly": true,
"enum": [
"Microsoft.ManagedIdentity/userAssignedIdentities"
],
"x-ms-enum": {
"name": "UserAssignedIdentities",
"modelAsString": true
},
"description": "The type of resource i.e. Microsoft.ManagedIdentity/userAssignedIdentities"
}
},
"required": [
"location"
],
"allOf": [
{
"$ref": "#/definitions/Resource"
"$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/TrackedResource"
}
],
"x-ms-azure-resource": true,
"description": "Describes an identity resource."
},
"SystemAssignedIdentity": {
"properties": {
"location": {
"type": "string",
"x-ms-mutability": [
"read",
"create"
],
"description": "The geo-location where the resource lives"
},
"tags": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-ms-mutability": [
"read",
"create",
"update"
],
"description": "Resource tags"
},
"properties": {
"x-ms-client-flatten": true,
"readOnly": true,
"description": "The properties associated with the identity.",
"$ref": "#/definitions/IdentityProperties"
},
"type": {
"type": "string",
"readOnly": true,
"description": "The type of resource i.e. Microsoft.Compute/virtualMachineScaleSets"
}
},
"required": [
"location"
],
"allOf": [
{
"$ref": "#/definitions/Resource"
"$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ProxyResource"
}
],
"x-ms-azure-resource": true,
"description": "Describes a system assigned identity resource."
},
"IdentityProperties": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/IdentityPatch"
"$ref": "#/definitions/IdentityUpdate"
},
"description": "Parameters to update the identity"
}
Expand Down Expand Up @@ -351,124 +351,95 @@
}
},
"definitions": {
"Resource": {
"properties": {
"id": {
"type": "string",
"readOnly": true,
"description": "The id of the resource."
},
"name": {
"type": "string",
"readOnly": true,
"description": "The name of the resource."
},
"location": {
"type": "string",
"description": "The Azure region where the resource lives."
}
},
"x-ms-azure-resource": true,
"description": "Describes common properties of a resource."
},
"Identity": {
"properties": {
"tags": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Resource tags"
},
"properties": {
"x-ms-client-flatten": true,
"readOnly": true,
"description": "The properties associated with the identity.",
"$ref": "#/definitions/UserAssignedIdentityProperties"
},
"type": {
"type": "string",
"readOnly": true,
"enum": [
"Microsoft.ManagedIdentity/userAssignedIdentities"
],
"x-ms-enum": {
"name": "UserAssignedIdentities",
"modelAsString": true
},
"description": "The type of resource i.e. Microsoft.ManagedIdentity/userAssignedIdentities"
}
},
"required": [
"location"
],
"allOf": [
{
"$ref": "#/definitions/Resource"
"$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/TrackedResource"
}
],
"x-ms-azure-resource": true,
"description": "Describes an identity resource."
},
"IdentityPatch": {
"IdentityUpdate": {
"properties": {
"location": {
"type": "string",
"x-ms-mutability": [
"read",
"create"
],
"description": "The geo-location where the resource lives"
},
"tags": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-ms-mutability": [
"read",
"create",
"update"
],
"description": "Resource tags"
},
"properties": {
"x-ms-client-flatten": true,
"readOnly": true,
"description": "The properties associated with the identity.",
"$ref": "#/definitions/UserAssignedIdentityProperties"
},
"type": {
"type": "string",
"readOnly": true,
"enum": [
"Microsoft.ManagedIdentity/userAssignedIdentities"
],
"x-ms-enum": {
"name": "UserAssignedIdentities",
"modelAsString": true
},
"description": "The type of resource i.e. Microsoft.ManagedIdentity/userAssignedIdentities"
}
},
"allOf": [
{
"$ref": "#/definitions/Resource"
"$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/Resource"
}
],
"x-ms-azure-resource": true,
"description": "Describes an identity resource."
},
"SystemAssignedIdentity": {
"properties": {
"location": {
"type": "string",
"x-ms-mutability": [
"read",
"create"
],
"description": "The geo-location where the resource lives"
},
"tags": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-ms-mutability": [
"read",
"create",
"update"
],
"description": "Resource tags"
},
"properties": {
"x-ms-client-flatten": true,
"readOnly": true,
"description": "The properties associated with the identity.",
"$ref": "#/definitions/SystemAssignedIdentityProperties"
},
"type": {
"type": "string",
"readOnly": true,
"description": "The type of resource i.e. Microsoft.Compute/virtualMachineScaleSets"
}
},
"required": [
"location"
],
"allOf": [
{
"$ref": "#/definitions/Resource"
"$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ProxyResource"
}
],
"x-ms-azure-resource": true,
"description": "Describes a system assigned identity resource."
},
"SystemAssignedIdentityProperties": {
Expand Down

0 comments on commit c2246b9

Please sign in to comment.