-
Notifications
You must be signed in to change notification settings - Fork 540
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #120707 from Jefftree/csa-openapiv3
Use OpenAPI V3 for client side SMP Kubernetes-commit: 07d2da75bd6b5a0bd9b4618889ba1a42ad192b03
- Loading branch information
Showing
5 changed files
with
416 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
180 changes: 180 additions & 0 deletions
180
pkg/util/strategicpatch/testdata/swagger-merge-item-v3.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,180 @@ | ||
{ | ||
"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" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.