cuelang.org/go@v0.13.0/encoding/jsonschema/testdata/txtar/crd_properties_with_additionalproperties.txtar (about)

     1  #version: k8sCRD
     2  
     3  -- schema.json --
     4  {
     5      "apiVersion": "apiextensions.k8s.io/v1",
     6      "kind": "CustomResourceDefinition",
     7      "metadata": {
     8          "name": "myapps.example.com"
     9      },
    10      "spec": {
    11          "group": "example.com",
    12          "scope": "Namespaced",
    13          "names": {
    14              "kind": "MyApp",
    15              "singular": "myapp",
    16              "plural": "myapps"
    17          },
    18          "versions": [
    19              {
    20                  "name": "v1",
    21                  "served": true,
    22                  "storage": true,
    23                  "schema": {
    24                      "openAPIV3Schema": {
    25                          "type": "object",
    26                          "properties": {
    27                              "spec": {
    28                                  "type": "object",
    29                                  "x-kubernetes-preserve-unknown-fields": true
    30                              }
    31                          },
    32                          "additionalProperties": {
    33                              "type": "string"
    34                          }
    35                      }
    36                  }
    37              }
    38          ]
    39      }
    40  }
    41  
    42  -- out/decode/extract --
    43  ERROR:
    44  additionalProperties may not be combined with properties in Kubernetes CRD:
    45      schema.json:21:21