title: jsonschema: validate list of dictionaries with specifc keys
body: <p>I'm trying to write a jsonschema for a list of dictionaries (aka an array of objects) where I validate the keys in the dictionary. The labels in this example are what I'm interested in. I'd like to allow an arbitrary number of labels and like to validate that the <code>name</code> and <code>value</code> fields always exist in the label dictionary.  Here is an example input represented as yaml. </p>
  
  <pre><code>some_field1: "value_a"
  some_field2: "value_b"
  labels:
  - name: "bar"
    value: "foo"
  - name: "baz"
    value: "blah"
  </code></pre>
  
  <p>Here is what I've pieced together so far, but it doesn't validate the keys in the dictionaries. I'm not sure exactly how the additionalProperites works in this case, but I found an example online.</p>
  
  <pre><code>properties:
    some_field1:
      type: string
      default: 'value_a'
    some_field2:
      type: string
      default: 'value_b'
    labels:
      type: array
      items:
        type: object
        additionalProperties:
          type: string
  </code></pre>
  
  <p>My use case is that I'm trying to create a Custom Resource Definition (CRD) for Kubernetes where I validate the input, and my understanding is that the CRDs use openapi3/jsonschema validation to define their fields. </p>
  
  <p>I'm having trouble finding an information about how to validate a list of dictionaries with specific keys. I'd appreciate any help that you have to offer. </p>