fix patch example. (#517)
This commit is contained in:
@@ -7,25 +7,36 @@ namespace k8s.Models
|
||||
[JsonConverter(typeof(V1PathJsonConverter))]
|
||||
public partial class V1Patch
|
||||
{
|
||||
public enum PathType
|
||||
public enum PatchType
|
||||
{
|
||||
JsonPatch,
|
||||
MergePatch,
|
||||
StrategicMergePatch,
|
||||
}
|
||||
|
||||
public PathType Type { get; private set; }
|
||||
public PatchType Type { get; private set; }
|
||||
|
||||
public V1Patch(IJsonPatchDocument jsonPatch)
|
||||
: this((object)jsonPatch)
|
||||
{
|
||||
}
|
||||
|
||||
public V1Patch(String body, PatchType type)
|
||||
: this(body)
|
||||
{
|
||||
this.Type = type;
|
||||
}
|
||||
|
||||
partial void CustomInit()
|
||||
{
|
||||
if (Content is IJsonPatchDocument)
|
||||
{
|
||||
Type = PathType.JsonPatch;
|
||||
Type = PatchType.JsonPatch;
|
||||
return;
|
||||
}
|
||||
|
||||
if (Content is String)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user