diff --git a/specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/timeseriesinsights.json b/specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/timeseriesinsights.json index 190ce3b7cb64..4bd8ce2a695c 100644 --- a/specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/timeseriesinsights.json +++ b/specification/timeseriesinsights/resource-manager/Microsoft.TimeSeriesInsights/stable/2020-05-15/timeseriesinsights.json @@ -1406,7 +1406,21 @@ }, "EnvironmentUpdateParameters": { "type": "object", + "discriminator": "kind", "properties": { + "kind": { + "type": "string", + "readOnly": true, + "description": "The kind of the environment.", + "enum": [ + "Gen1", + "Gen2" + ], + "x-ms-enum": { + "name": "EnvironmentKind", + "modelAsString": true + } + }, "tags": { "type": "object", "additionalProperties": { @@ -1419,6 +1433,7 @@ }, "Gen1EnvironmentUpdateParameters": { "type": "object", + "x-ms-discriminator-value": "Gen1", "properties": { "sku": { "$ref": "#/definitions/Sku", @@ -1439,6 +1454,7 @@ }, "Gen2EnvironmentUpdateParameters": { "type": "object", + "x-ms-discriminator-value": "Gen2", "properties": { "properties": { "x-ms-client-flatten": true, @@ -1618,9 +1634,6 @@ }, { "$ref": "#/definitions/EnvironmentResourceProperties" - }, - { - "$ref": "#/definitions/ResourceProperties" } ], "required": [ @@ -1654,9 +1667,6 @@ "allOf": [ { "$ref": "#/definitions/EnvironmentResourceProperties" - }, - { - "$ref": "#/definitions/ResourceProperties" } ], "description": "Properties of the Gen2 environment." @@ -1900,8 +1910,22 @@ "description": "Parameters supplied to the Create or Update Event Source operation for an IoTHub event source." }, "EventSourceUpdateParameters": { + "discriminator": "kind", "type": "object", "properties": { + "kind": { + "type": "string", + "readOnly": true, + "description": "The kind of the event source.", + "enum": [ + "Microsoft.EventHub", + "Microsoft.IoTHub" + ], + "x-ms-enum": { + "name": "EventSourceKind", + "modelAsString": true + } + }, "tags": { "type": "object", "additionalProperties": { diff --git a/specification/timeseriesinsights/resource-manager/readme.md b/specification/timeseriesinsights/resource-manager/readme.md index 6e5d24befcad..ab4686fed747 100644 --- a/specification/timeseriesinsights/resource-manager/readme.md +++ b/specification/timeseriesinsights/resource-manager/readme.md @@ -68,6 +68,15 @@ input-file: ``` yaml directive: + - suppress: READONLY_PROPERTY_NOT_ALLOWED_IN_REQUEST + where: + - $.definitions.EnvironmentUpdateParameters.properties.kind + - $.definitions.EventSourceUpdateParameters.properties.kind + from: timeseriesinsights.json + reason: This property is the discriminator for polymorph, but it can not be in request body. + - suppress: OAV131 # DISCRIMINATOR_NOT_REQUIRED + from: timeseriesinsights.json + reason: kind is a non-settable property from the client in patch method. - suppress: R3025 # Tracked resource 'XXX' must have a get operation where: - $.definitions.StandardEnvironmentResource