Skip to content

Commit ec8d41f

Browse files
added correct json for k8s tab
1 parent 8816b21 commit ec8d41f

File tree

1 file changed

+30
-7
lines changed

1 file changed

+30
-7
lines changed

articles/iot-operations/connect-to-cloud/howto-create-dataflow.md

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -550,16 +550,39 @@ To specify the schema, you can create a Schema custom resource with the schema d
550550

551551
For more information about schema registry, see [Understand message schemas](concept-schema-registry.md).
552552

553-
554553
```json
555554
{
556-
"type": "record",
555+
"$schema": "http://json-schema.org/draft-07/schema#",
557556
"name": "Temperature",
558-
"fields": [
559-
{"name": "deviceId", "type": "string"},
560-
{"name": "temperatureCelsius", "type": "float"}
561-
{"name": "location", "type": "string"}
562-
]
557+
"description": "Schema for representing an asset's key attributes",
558+
"type": "object",
559+
"required": [ "deviceId", "asset_name"],
560+
"properties": {
561+
"deviceId": {
562+
"type": "string"
563+
},
564+
"temperature": {
565+
"type": "double"
566+
},
567+
"serial_number": {
568+
"type": "string"
569+
},
570+
"production_date": {
571+
"type": "string",
572+
"description": "Event duration"
573+
},
574+
"asset_name": {
575+
"type": "string",
576+
"description": "Name of asset"
577+
},
578+
"location": {
579+
"type": "string",
580+
},
581+
"manufacturer": {
582+
"type": "string",
583+
"description": "Name of manufacturer"
584+
}
585+
}
563586
}
564587
```
565588

0 commit comments

Comments
 (0)