kubernetes/staging/src/k8s.io/apimachinery/pkg/util/strategicpatch/testdata/swagger-merge-item-v3.json

{
  "openapi": "3.0",
  "info": {
    "title": "StrategicMergePatchTestingMergeItem",
    "version": "v3.0"
  },
  "paths": {},
  "components": {
    "schemas": {
      "mergeItem": {
        "description": "MergeItem is type definition for testing strategic merge.",
        "required": [],
        "properties": {
          "name": {
            "description": "Name field.",
            "type": "string"
          },
          "value": {
            "description": "Value field.",
            "type": "string"
          },
          "other": {
            "description": "Other field.",
            "type": "string"
          },
          "mergingList": {
            "description": "MergingList field.",
            "type": "array",
            "items": {
              "default": {},
              "allOf": [
                {"$ref": "#/components/schemas/mergeItem"}
              ]
            },
            "x-kubernetes-patch-merge-key": "name",
            "x-kubernetes-patch-strategy": "merge"
          },
          "nonMergingList": {
            "description": "NonMergingList field.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/mergeItem"
            }
          },
          "mergingIntList": {
            "description": "MergingIntList field.",
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "x-kubernetes-patch-strategy": "merge"
          },
          "nonMergingIntList": {
            "description": "NonMergingIntList field.",
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          },
          "mergeItemPtr": {
            "description": "MergeItemPtr field.",
            "allOf": [
              {"$ref": "#/components/schemas/mergeItem"}
            ],
            "x-kubernetes-patch-merge-key": "name",
            "x-kubernetes-patch-strategy": "merge"
          },
          "simpleMap": {
            "description": "SimpleMap field.",
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "replacingItem": {
            "description": "ReplacingItem field.",
            "allOf": [
              {"$ref": "#/components/schemas/io.k8s.apimachinery.pkg.runtime.RawExtension"}
            ],
            "x-kubernetes-patch-strategy": "replace"
          },
          "retainKeysMap": {
            "description": "RetainKeysMap field.",
            "allOf": [
              {"$ref": "#/components/schemas/retainKeysMergeItem"}
            ],
            "x-kubernetes-patch-strategy": "retainKeys"
          },
          "retainKeysMergingList": {
            "description": "RetainKeysMergingList field.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/mergeItem"
            },
            "x-kubernetes-patch-merge-key": "name",
            "x-kubernetes-patch-strategy": "merge,retainKeys"
          }
        },
        "x-kubernetes-group-version-kind": [
          {
            "group": "fake-group",
            "kind": "mergeItem",
            "version": "some-version"
          }
        ]
      },
      "retainKeysMergeItem": {
        "description": "RetainKeysMergeItem is type definition for testing strategic merge.",
        "required": [],
        "properties": {
          "name": {
            "description": "Name field.",
            "type": "string"
          },
          "value": {
            "description": "Value field.",
            "type": "string"
          },
          "other": {
            "description": "Other field.",
            "type": "string"
          },
          "simpleMap": {
            "description": "SimpleMap field.",
            "items": {
              "type": "string"
            }
          },
          "mergingList": {
            "description": "MergingList field.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/mergeItem"
            },
            "x-kubernetes-patch-merge-key": "name",
            "x-kubernetes-patch-strategy": "merge"
          },
          "nonMergingList": {
            "description": "NonMergingList field.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/mergeItem"
            }
          },
          "mergingIntList": {
            "description": "MergingIntList field.",
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "x-kubernetes-patch-strategy": "merge"
          }
        },
        "x-kubernetes-group-version-kind": [
          {
            "group": "fake-group",
            "kind": "retainKeysMergeItem",
            "version": "some-version"
          }
        ]
      },
      "io.k8s.apimachinery.pkg.runtime.RawExtension": {
        "description": "RawExtension is used to hold extensions in external versions.",
        "required": [
          "Raw"
        ],
        "properties": {
          "Raw": {
            "description": "Raw is the underlying serialization of this object.",
            "type": "string",
            "format": "byte"
          }
        }
      }
    }
  }
}