import jsl


class TargetInfo(jsl.Document):
    docker = jsl.ArrayField(jsl.StringField(), max_items=2)
    rsync = jsl.ArrayField(jsl.StringField(), max_items=2)
    containers = jsl.ArrayField([
        jsl.StringField(),
        jsl.ArrayField(jsl.StringField())
    ])

import jsl


class TargetInfo(jsl.Document):
    docker = jsl.ArrayField([
        jsl.StringField(),
        jsl.OneOfField([jsl.StringField(), jsl.NullField()])
    ])
    rsync = jsl.ArrayField([
        jsl.StringField(),
        jsl.OneOfField([jsl.StringField(), jsl.NullField()])
    ])
    containers = jsl.ArrayField([
        jsl.StringField(),
        jsl.ArrayField(jsl.StringField())
    ])

Correct the target info schema: docker and rsync messages are Null in case of success. Suggested by @vinzenz and corrected by @artmello.
Correct the target info schema: docker and rsync messages are Null in case of
success. Suggested by @vinzenz and corrected by @artmello.

  import jsl
  
  
  class TargetInfo(jsl.Document):
-     docker = jsl.ArrayField(jsl.StringField(), max_items=2)
-     rsync = jsl.ArrayField(jsl.StringField(), max_items=2)
+     docker = jsl.ArrayField([
+         jsl.StringField(),
+         jsl.OneOfField([jsl.StringField(), jsl.NullField()])
+     ])
+     rsync = jsl.ArrayField([
+         jsl.StringField(),
+         jsl.OneOfField([jsl.StringField(), jsl.NullField()])
+     ])
      containers = jsl.ArrayField([
          jsl.StringField(),
          jsl.ArrayField(jsl.StringField())
      ])
  
Correct the target info schema: docker and rsync messages are Null in case of success. Suggested by @vinzenz and corrected by @artmello.
## Code Before:
import jsl


class TargetInfo(jsl.Document):
    docker = jsl.ArrayField(jsl.StringField(), max_items=2)
    rsync = jsl.ArrayField(jsl.StringField(), max_items=2)
    containers = jsl.ArrayField([
        jsl.StringField(),
        jsl.ArrayField(jsl.StringField())
    ])

## Instruction:
Correct the target info schema: docker and rsync messages are Null in case of success. Suggested by @vinzenz and corrected by @artmello.
## Code After:
import jsl


class TargetInfo(jsl.Document):
    docker = jsl.ArrayField([
        jsl.StringField(),
        jsl.OneOfField([jsl.StringField(), jsl.NullField()])
    ])
    rsync = jsl.ArrayField([
        jsl.StringField(),
        jsl.OneOfField([jsl.StringField(), jsl.NullField()])
    ])
    containers = jsl.ArrayField([
        jsl.StringField(),
        jsl.ArrayField(jsl.StringField())
    ])
