Skip to content

I want to set a default value for message_sensor. I don't know how to write config.schema.yaml files. #17

Description

@chain312

I configured it this way but it didn't work.

    message_sensor:
    description: "Sensor specific settings"
    type: "object"
    required: true
    additionalProperties: true
    properties:
      hosts:
        description: "List of Kafka brokers hosts:port for sensor to connect to"
        type: "string"
        default: "kafka-headless:9092"
        required: true
      topics:
        description: "List of topics for the sensor to subscribe to"
        type: "array"
        items:
          type: "string"
          default:
            - test1
            - test2
            - test3
            - test4
          required: true
      group_id:
        description: "The sensors group ID"
        type: "string"
        default: "soargcpgroup"
        required: true
      client_id:
        description: "The sensors client ID"
        type: "string"
        default: "soargcpclient"
        required: true

image
I want message_sensor to be this value {"client_id": "soargcpclient", "group_id": "soargcpgroup", "hosts": "kafka-headless:9092", "topics": ["test1", "test2", "test3", "test4"]}, but this value is '{}'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions