diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/autorest.md b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/autorest.md index 17662eeb51af5..4c2b91a784d0f 100644 --- a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/autorest.md +++ b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/autorest.md @@ -1,16 +1,29 @@ # Azure.DigitalTwins.Core +## Azure DigitalTwins swagger + +## Local copy of the swagger document + +A local copy of the official swagger documents are stored in this directory for convenience and testing purposes. Please make sure that you do not use these swagger documents for official code generation purposes. + +## Official swagger document + +The official swagger specification for Azure DigitalTwins can be found [here](https://raw.githubusercontent.com/Azure/azure-rest-api-specs/97db8d1015c2780c2704fe0f55537ff1f4740140/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/preview/2020-05-31-preview/digitaltwins.json). + +## Code generation + Run `generate.ps1` in this directory to generate the code. -### AutoRest Configuration -> see https://aka.ms/autorest +## AutoRest Configuration + +> see ``` yaml -#when generating from local changes: -input-file: $(this-folder)/swagger/digitaltwins.json +#when generating from official source - The raw link must have a commit hash for C# generator +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/97db8d1015c2780c2704fe0f55537ff1f4740140/specification/digitaltwins/data-plane/Microsoft.DigitalTwins/preview/2020-05-31-preview/digitaltwins.json -#when generating from official source -#require: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/c3dd5df2863101b56eef256b810927cdcc4e44d2/specification/digitaltwins/data-plane/readme.md +#if you want to generate using local changes: +#input-file: $(this-folder)/swagger/2020-05-31-preview/digitaltwins.json #azure-arm: true #license-header: MICROSOFT_MIT_NO_VERSION diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/digitaltwins.json b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/digitaltwins.json similarity index 100% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/digitaltwins.json rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/digitaltwins.json diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/CreateRelationshipAdvancedExample.json b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/CreateRelationshipAdvancedExample.json similarity index 100% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/CreateRelationshipAdvancedExample.json rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/CreateRelationshipAdvancedExample.json diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/CreateRelationshipBasicExample.json b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/CreateRelationshipBasicExample.json similarity index 100% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/CreateRelationshipBasicExample.json rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/CreateRelationshipBasicExample.json diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/DeleteModel.json b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/DeleteModel.json similarity index 100% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/DeleteModel.json rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/DeleteModel.json diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/DeleteRelationship.json b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/DeleteRelationship.json similarity index 100% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/DeleteRelationship.json rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/DeleteRelationship.json diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/DeleteTwin.json b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/DeleteTwin.json similarity index 100% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/DeleteTwin.json rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/DeleteTwin.json diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/EventRouteDelete.json b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/EventRouteDelete.json similarity index 100% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/EventRouteDelete.json rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/EventRouteDelete.json diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/EventRouteGet.json b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/EventRouteGet.json similarity index 100% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/EventRouteGet.json rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/EventRouteGet.json diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/EventRoutePut.json b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/EventRoutePut.json similarity index 100% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/EventRoutePut.json rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/EventRoutePut.json diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/EventRoutePutWithFilter.json b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/EventRoutePutWithFilter.json similarity index 100% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/EventRoutePutWithFilter.json rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/EventRoutePutWithFilter.json diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/EventRoutesList.json b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/EventRoutesList.json similarity index 100% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/EventRoutesList.json rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/EventRoutesList.json diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/GetComponent.json b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/GetComponent.json similarity index 100% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/GetComponent.json rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/GetComponent.json diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/GetIncomingRelationship.json b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/GetIncomingRelationship.json similarity index 100% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/GetIncomingRelationship.json rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/GetIncomingRelationship.json diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/GetRelationship.json b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/GetRelationship.json similarity index 100% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/GetRelationship.json rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/GetRelationship.json diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/GetRelationshipById.json b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/GetRelationshipById.json similarity index 100% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/GetRelationshipById.json rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/GetRelationshipById.json diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/GetRelationshipByRelationshipName.json b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/GetRelationshipByRelationshipName.json similarity index 100% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/GetRelationshipByRelationshipName.json rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/GetRelationshipByRelationshipName.json diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/GetTwin.json b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/GetTwin.json similarity index 100% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/GetTwin.json rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/GetTwin.json diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/ModelAdd.json b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/ModelAdd.json similarity index 100% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/ModelAdd.json rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/ModelAdd.json diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/ModelGetById.json b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/ModelGetById.json similarity index 100% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/ModelGetById.json rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/ModelGetById.json diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/ModelGetByIdWithIncludeModelDefinition.json b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/ModelGetByIdWithIncludeModelDefinition.json similarity index 100% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/ModelGetByIdWithIncludeModelDefinition.json rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/ModelGetByIdWithIncludeModelDefinition.json diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/ModelUpdateDecommissioned.json b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/ModelUpdateDecommissioned.json similarity index 100% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/ModelUpdateDecommissioned.json rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/ModelUpdateDecommissioned.json diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/ModelsGet.json b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/ModelsGet.json similarity index 100% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/ModelsGet.json rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/ModelsGet.json diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/ModelsGetWithDependenciesAndIncludeModelDefinition.json b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/ModelsGetWithDependenciesAndIncludeModelDefinition.json similarity index 100% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/ModelsGetWithDependenciesAndIncludeModelDefinition.json rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/ModelsGetWithDependenciesAndIncludeModelDefinition.json diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/PatchComponentAdvancedExample.json b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/PatchComponentAdvancedExample.json similarity index 100% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/PatchComponentAdvancedExample.json rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/PatchComponentAdvancedExample.json diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/PatchComponentBasicExample.json b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/PatchComponentBasicExample.json similarity index 100% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/PatchComponentBasicExample.json rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/PatchComponentBasicExample.json diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/PatchRelationshipAdvancedExample.json b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/PatchRelationshipAdvancedExample.json similarity index 100% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/PatchRelationshipAdvancedExample.json rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/PatchRelationshipAdvancedExample.json diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/PatchRelationshipBasicExample.json b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/PatchRelationshipBasicExample.json similarity index 100% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/PatchRelationshipBasicExample.json rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/PatchRelationshipBasicExample.json diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/PatchTwinAdvancedExample.json b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/PatchTwinAdvancedExample.json similarity index 100% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/PatchTwinAdvancedExample.json rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/PatchTwinAdvancedExample.json diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/PatchTwinBasicExample.json b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/PatchTwinBasicExample.json similarity index 100% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/PatchTwinBasicExample.json rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/PatchTwinBasicExample.json diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/PutTwinAdvancedExample.json b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/PutTwinAdvancedExample.json similarity index 100% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/PutTwinAdvancedExample.json rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/PutTwinAdvancedExample.json diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/PutTwinBasicExample.json b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/PutTwinBasicExample.json similarity index 100% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/PutTwinBasicExample.json rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/PutTwinBasicExample.json diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/QueryFirstPage.json b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/QueryFirstPage.json similarity index 100% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/QueryFirstPage.json rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/QueryFirstPage.json diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/QueryJoin.json b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/QueryJoin.json similarity index 100% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/QueryJoin.json rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/QueryJoin.json diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/QueryNextPage.json b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/QueryNextPage.json similarity index 100% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/QueryNextPage.json rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/QueryNextPage.json diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/SendTelemetry.json b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/SendTelemetry.json similarity index 100% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/SendTelemetry.json rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/SendTelemetry.json diff --git a/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/SendTelemetryFromComponent.json b/sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/SendTelemetryFromComponent.json similarity index 100% rename from sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/examples/SendTelemetryFromComponent.json rename to sdk/digitaltwins/Azure.DigitalTwins.Core/src/swagger/2020-05-31-preview/examples/SendTelemetryFromComponent.json