Skip to content

Commit

Permalink
[Refactor only] Try to use common type as much as possible and remove…
Browse files Browse the repository at this point in the history
… not used field (Azure#16648)

* IoT Central Public API 1.1-preview Oct Release (Azure#16514)

* Add new 2.0-preview.1 version for IoT Central

* fix typo on enum value

* rollback 1.0 changes, applied 2.0-preview.1

* fix typo

* remove non-used examples

* fix style

* update version from 2.0-preview.1 to 1.1-preview

* update code review comments, fix patch consumes with json-patch support, fix examples for fileupload

* add nextLink to collection of orgs

* fix typo

* fix wrong position of paging

* fix the paging

* add . to description

* update default to use enum for api-version

* add oct release with query, cde v2, device filter, device template filter, relationship, edge template, simplified template patching

* update examples

* fix lint error, model validation

* fix missing type in examples, remove url format

* fix ID case

* fix id case

* fix ID case

* add iotc query language reference

* fix typo

* Try to use common types for operation list

* Fix semnatic

* try to use provided tracked resrouce

* Remove dup

* Fix tracked resource

* blah

* remove not used stuff

* Remove types aren't used

* use parameters from common

* fix correct path

* Adding back

* Adding coming sku back

Co-authored-by: Johnson Yang <[email protected]>
  • Loading branch information
sureleo and yang-hai-feng authored Nov 4, 2021
1 parent 42c2ad5 commit 4faf292
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 222 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,200 +38,6 @@
"name"
]
},
"IdentityType": {
"description": "The type of identity that creates/modifies resources",
"type": "string",
"enum": [
"User",
"Application",
"ManagedIdentity",
"Key"
],
"x-ms-enum": {
"name": "IdentityType",
"modelAsString": true
}
},
"Identity": {
"description": "Identity for the resource.",
"type": "object",
"properties": {
"principalId": {
"readOnly": true,
"type": "string",
"description": "The principal ID of resource identity."
},
"tenantId": {
"readOnly": true,
"type": "string",
"description": "The tenant ID of resource."
},
"type": {
"type": "string",
"description": "The identity type.",
"enum": [
"SystemAssigned"
],
"x-ms-enum": {
"name": "ResourceIdentityType",
"modelAsString": false
}
}
}
},
"Plan": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "A user defined name of the 3rd Party Artifact that is being procured."
},
"publisher": {
"type": "string",
"description": "The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic"
},
"product": {
"type": "string",
"description": "The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding. "
},
"promotionCode": {
"type": "string",
"description": "A publisher provided promotion code as provisioned in Data Market for the said product/artifact."
},
"version": {
"type": "string",
"description": "The version of the desired product/artifact."
}
},
"description": "Plan for the resource.",
"required": [
"name",
"publisher",
"product"
]
},
"Resource": {
"type": "object",
"properties": {
"id": {
"readOnly": true,
"type": "string",
"description": "Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
},
"name": {
"readOnly": true,
"type": "string",
"description": "The name of the resource"
},
"type": {
"readOnly": true,
"type": "string",
"description": "The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts."
}
},
"x-ms-azure-resource": true
},
"TrackedResource": {
"type": "object",
"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"
],
"description": "Resource tags."
},
"location": {
"type": "string",
"x-ms-mutability": [
"read",
"create"
],
"description": "The geo-location where the resource lives"
},
"systemData": {
"$ref": "#/definitions/SystemData",
"readOnly": true
}
},
"required": [
"location"
],
"allOf": [
{
"$ref": "#/definitions/Resource"
}
]
},
"ProxyResource": {
"type": "object",
"description": "The resource model definition for a ARM proxy resource. It will have everything other than required location and tags",
"allOf": [
{
"$ref": "#/definitions/Resource"
}
]
},
"SystemData": {
"description": "Read only system data",
"type": "object",
"readOnly": true,
"properties": {
"createdBy": {
"type": "string",
"description": "An identifier for the identity that created the resource"
},
"createdByType": {
"$ref": "#/definitions/IdentityType",
"description": "The type of identity that created the resource"
},
"createdAt": {
"type": "string",
"format": "date-time",
"description": "The timestamp of resource creation (UTC)"
},
"lastModifiedBy": {
"type": "string",
"description": "An identifier for the identity that last modified the resource"
},
"lastModifiedByType": {
"$ref": "#/definitions/IdentityType",
"description": "The type of identity that last modified the resource"
},
"lastModifiedAt": {
"type": "string",
"format": "date-time",
"description": "The timestamp of resource last modification (UTC)"
}
}
},
"ResourceSku": {
"type": "object",
"properties": {
"capacity": {
"type": "integer",
"format": "int32"
},
"family": {
"type": "string"
},
"name": {
"type": "string"
},
"size": {
"type": "string"
},
"tier": {
"type": "string"
}
}
},
"ErrorResponse": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -267,31 +73,6 @@
},
"description": "An error response from the Batch service."
},
"ODataError": {
"properties": {
"code": {
"type": "string",
"description": "A language-independent error name."
},
"message": {
"type": "string",
"description": "The error message."
},
"target": {
"type": "string",
"description": "The target of the error (for example, the name of the property in error)."
},
"details": {
"type": "array",
"items": {
"$ref": "#/definitions/ODataError"
},
"description": "The error details."
}
},
"type": "object",
"description": "Information about an error."
},
"ExtendedLocation": {
"type": "object",
"description": "The complex type of the extended location.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"type": "object",
"allOf": [
{
"$ref": "./common.json#/definitions/TrackedResource"
"$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource"
}
],
"properties": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"type": "object",
"allOf": [
{
"$ref": "./common.json#/definitions/TrackedResource"
"$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource"
}
],
"properties": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"type": "object",
"allOf": [
{
"$ref": "./common.json#/definitions/TrackedResource"
"$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource"
}
],
"properties": {
Expand Down

0 comments on commit 4faf292

Please sign in to comment.