Skip to content

Commit

Permalink
Microsoft.DigitalTwins - add stable data-plane API version 2022-05-31 (
Browse files Browse the repository at this point in the history
…#18790)

* Add blockchain to latest profile

* Add additional types

* Adds base for updating Microsoft.DigitalTwins from version preview/2021-06-30-preview to version 2022-05-31

* Updates readme

* Updates API version in new specs and examples

* Add new API version

* Update build configuration

* Add sourceTime examples

* Reformat examples

* Address review comments

* Address more review feedback

* Fix required fields

* Address semantic validation errors

* Fix lintdiff errors

* Fix lintdiff warnings

* Address model validation errors

* Fix formatting

* Add back readonly, since model is only returned by service

* Remove required properties from Error model

Co-authored-by: Mark Cowlishaw <[email protected]>
  • Loading branch information
sjiherzig and markcowl authored Jun 29, 2022
1 parent 60a19ff commit 9135e20
Show file tree
Hide file tree
Showing 39 changed files with 2,722 additions and 9 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"parameters": {
"api-version": "2022-05-31",
"id": "mySourceTwin",
"relationshipId": "myRelationshipId",
"relationship": {
"$targetId": "myTargetTwin",
"$relationshipName": "myRelationship",
"relationshipProperty1": 1,
"relationshipProperty2": "some value"
}
},
"responses": {
"200": {
"body": {
"$relationshipId": "myRelationshipId",
"$sourceId": "mySourceTwin",
"$targetId": "myTargetTwin",
"$relationshipName": "myRelationship",
"relationshipProperty1": 1,
"relationshipProperty2": "some value",
"$etag": "W/\"1553dbf5-0052-4be8-bea8-46269075b503\""
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"parameters": {
"api-version": "2022-05-31",
"id": "mySourceTwin",
"relationshipId": "myRelationshipId",
"relationship": {
"$targetId": "myTargetTwin",
"$relationshipName": "myRelationship"
}
},
"responses": {
"200": {
"body": {
"$relationshipId": "myRelationshipId",
"$sourceId": "mySourceTwin",
"$targetId": "myTargetTwin",
"$relationshipName": "myRelationship",
"$etag": "W/\"1553dbf5-0052-4be8-bea8-46269075b503\""
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"parameters": {
"api-version": "2022-05-31",
"id": "dtmi:com:example:Sample;1"
},
"responses": {
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"parameters": {
"api-version": "2022-05-31",
"id": "myTwinId",
"relationshipId": "myRelationshipId"
},
"responses": {
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"parameters": {
"api-version": "2022-05-31",
"id": "myTwinId"
},
"responses": {
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"parameters": {
"id": "eventroute-001",
"api-version": "2022-05-31"
},
"responses": {
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"parameters": {
"id": "eventroute-001",
"api-version": "2022-05-31"
},
"responses": {
"200": {
"body": {
"id": "eventroute-001",
"endpointName": "endpoint-001",
"filter": "type = 'Microsoft.DigitalTwins.Twin.Create'"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"parameters": {
"id": "eventroute-001",
"eventRoute": {
"endpointName": "endpoint-001",
"filter": "true"
},
"api-version": "2022-05-31"
},
"responses": {
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"parameters": {
"id": "eventroute-001",
"eventRoute": {
"endpointName": "endpoint-001",
"filter": "type = 'Microsoft.DigitalTwins.Twin.Create'"
},
"api-version": "2022-05-31"
},
"responses": {
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"parameters": {
"api-version": "2022-05-31"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "eventroute-001",
"endpointName": "endpoint-001",
"filter": "type = 'Microsoft.DigitalTwins.Twin.Create'"
},
{
"id": "eventroute-002",
"endpointName": "endpoint-002",
"filter": "type = 'Microsoft.DigitalTwins.Twin.Create' OR type = 'microsoft.iot.telemetry'"
}
],
"nextLink": "url-to-next-page"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"parameters": {
"api-version": "2022-05-31",
"id": "myTwinId",
"componentPath": "myComponent"
},
"responses": {
"200": {
"body": {
"property1": 1,
"property2": {
"subProperty1": "some value",
"subProperty2": "some other value"
},
"component1": {
"componentProperty": "some value",
"$metadata": {
"$lastUpdateTime": "2022-02-28T00:30:00.1234567Z",
"componentProperty": {
"lastUpdateTime": "2022-02-28T00:30:00.1234567Z"
}
}
},
"$metadata": {
"$lastUpdateTime": "2022-02-28T00:30:00.1234567Z",
"property1": {
"lastUpdateTime": "2022-02-28T00:30:00.1234567Z"
},
"property2": {
"lastUpdateTime": "2022-02-28T00:30:00.1234567Z"
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"parameters": {
"api-version": "2022-05-31",
"id": "mySourceTwin"
},
"responses": {
"200": {
"body": {
"value": [
{
"$sourceId": "mySourceTwin",
"$relationshipId": "firstRelationshipId",
"$relationshipName": "myRelationship",
"$relationshipLink": "/digitaltwins/mySourceTwin/relationships/myRelationship/firstRelationshipId"
},
{
"$sourceId": "mySourceTwin",
"$relationshipId": "secondRelationshipId",
"$relationshipName": "myRelationship",
"$relationshipLink": "/digitaltwins/mySourceTwin/relationships/myRelationship/secondRelationshipId"
}
],
"nextLink": "url-to-next-page"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"parameters": {
"api-version": "2022-05-31",
"id": "mySourceTwin"
},
"responses": {
"200": {
"body": {
"value": [
{
"$sourceId": "mySourceTwin",
"$relationshipId": "firstRelationshipId",
"$targetId": "targetTwinId",
"$relationshipName": "myRelationship",
"$etag": "W/\"1553dbf5-0052-4be8-bea8-46269075b503\"",
"property": "value"
},
{
"$sourceId": "mySourceTwin",
"$relationshipId": "secondRelationshipId",
"$targetId": "targetTwinId",
"$relationshipName": "myRelationship",
"$etag": "W/\"2552a0a7-0666-4d5e-a67f-ece5b9b81fe0\"",
"property": "value"
}
],
"nextLink": "url-to-next-page"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"parameters": {
"api-version": "2022-05-31",
"id": "mySourceTwin",
"relationshipId": "myRelationshipId"
},
"responses": {
"200": {
"body": {
"$relationshipId": "myRelationshipId",
"$sourceId": "mySourceTwin",
"$targetId": "myTargetTwin",
"$relationshipName": "myRelationship",
"$etag": "W/\"1553dbf5-0052-4be8-bea8-46269075b503\"",
"relationshipProperty": "some value"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parameters": {
"api-version": "2022-05-31",
"id": "mySourceTwin",
"relationshipName": "myRelationship"
},
"responses": {
"200": {
"body": {
"value": [
{
"$sourceId": "mySourceTwin",
"$relationshipId": "firstRelationshipId",
"$targetId": "targetTwinId",
"$relationshipName": "myRelationship",
"$etag": "W/\"1553dbf5-0052-4be8-bea8-46269075b503\"",
"property": "value"
},
{
"$sourceId": "mySourceTwin",
"$relationshipId": "secondRelationshipId",
"$targetId": "targetTwinId",
"$relationshipName": "myRelationship",
"$etag": "W/\"2552a0a7-0666-4d5e-a67f-ece5b9b81fe0\"",
"property": "value"
}
],
"nextLink": "url-to-next-page"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"parameters": {
"api-version": "2022-05-31",
"id": "myTwinId"
},
"responses": {
"200": {
"body": {
"$dtId": "myTwinId",
"$etag": "W/\"9c2876c2-aff0-40b3-9fba-0c6be9d020a6\"",
"property1": 1,
"property2": {
"subProperty1": "some value",
"subProperty2": "some other value"
},
"component1": {
"componentProperty": "some value",
"$metadata": {
"$lastUpdateTime": "2022-02-28T00:30:00.1234567Z",
"componentProperty": {
"lastUpdateTime": "2022-02-28T00:30:00.1234567Z"
}
}
},
"$metadata": {
"$model": "dtmi:com:example:interfaces:interfaceName;1",
"$lastUpdateTime": "2022-02-28T00:30:00.1234567Z",
"property1": {
"lastUpdateTime": "2022-02-28T00:30:00.1234567Z"
},
"property2": {
"lastUpdateTime": "2022-02-28T00:30:00.1234567Z"
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"parameters": {
"models": [
{
"@id": "dtmi:com:example:Sample;1",
"@type": "Interface",
"displayName": "Sample Interface",
"contents": [
{
"@type": "Property",
"name": "name",
"displayName": "Sample instance name",
"schema": "string"
},
{
"@type": "Property",
"name": "temp",
"displayName": "Sample instance temperature",
"schema": "integer"
},
{
"@type": "Property",
"name": "comfortIndex",
"displayName": "Sample instance comfort index",
"schema": "integer"
}
],
"@context": "dtmi:dtdl:context;2"
}
],
"api-version": "2022-05-31"
},
"responses": {
"201": {
"body": [
{
"id": "dtmi:com:example:Sample;1",
"displayName": {
"en": "Sample Interface"
},
"uploadTime": "2022-02-28T00:30:00.1234567Z",
"decommissioned": false
}
]
}
}
}
Loading

0 comments on commit 9135e20

Please sign in to comment.