-
Notifications
You must be signed in to change notification settings - Fork 307
feat: enhance Kubernetes client with watch functionality #1667
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
80b46b7
6979dd5
136b103
f9a3d9c
201be85
942a645
9ac1f9c
4d752ed
5e47c09
6de5558
c6bda21
85d7011
0877710
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -122,7 +122,6 @@ private string GetDotNetType(JsonSchema schema, JsonSchemaProperty parent) | |||||||||||||||||||||||||||||||
return $"IDictionary<string, {GetDotNetType(schema.AdditionalPropertiesSchema, parent)}>"; | ||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
if (schema?.Reference != null) | ||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||
return classNameHelper.GetClassNameForSchemaDefinition(schema.Reference); | ||||||||||||||||||||||||||||||||
|
@@ -245,6 +244,16 @@ string toType() | |||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
break; | ||||||||||||||||||||||||||||||||
case "T": | ||||||||||||||||||||||||||||||||
var itemType = TryGetItemTypeFromSchema(response); | ||||||||||||||||||||||||||||||||
tg123 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||
if (itemType != null) | ||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||
return itemType; | ||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
break; | ||||||||||||||||||||||||||||||||
case "TList": | ||||||||||||||||||||||||||||||||
return t; | ||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
return t; | ||||||||||||||||||||||||||||||||
|
@@ -283,5 +292,26 @@ public static bool IfType(JsonSchemaProperty property, string type) | |||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
return false; | ||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
private string TryGetItemTypeFromSchema(OpenApiResponse response) | ||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||
var listSchema = response?.Schema?.Reference; | ||||||||||||||||||||||||||||||||
if (listSchema?.Properties?.TryGetValue("items", out var itemsProperty) != true) | ||||||||||||||||||||||||||||||||
Comment on lines
+298
to
+299
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The code attempts to access
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||
return null; | ||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||
Comment on lines
+298
to
+302
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The method attempts to access Properties on a JsonReference object, but JsonReference doesn't have a Properties property. This will always return null. You should resolve the reference first to get the actual schema.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
if (itemsProperty.Reference != null) | ||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||
return classNameHelper.GetClassNameForSchemaDefinition(itemsProperty.Reference); | ||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
if (itemsProperty.Item?.Reference != null) | ||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||
return classNameHelper.GetClassNameForSchemaDefinition(itemsProperty.Item.Reference); | ||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
return null; | ||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||
} |
Uh oh!
There was an error while loading. Please reload this page.