We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cba1bea commit cc05fbfCopy full SHA for cc05fbf
pkg/generate/code/set_resource.go
@@ -416,6 +416,18 @@ func setResourceReadMany(
416
// operation by checking for matching values in these fields.
417
matchFieldNames := r.ListOpMatchFieldNames()
418
419
+ for _, matchFieldName := range matchFieldNames {
420
+ _, foundSpec := r.SpecFields[matchFieldName]
421
+ _, foundStatus := r.StatusFields[matchFieldName]
422
+ if !foundSpec && !foundStatus {
423
+ msg := fmt.Sprintf(
424
+ "Match field name %s is not in %s Spec or Status fields",
425
+ matchFieldName, r.Names.Camel,
426
+ )
427
+ panic(msg)
428
+ }
429
430
+
431
// found := false
432
out += fmt.Sprintf("%sfound := false\n", indent)
433
// for _, elem := range resp.CacheClusters {
0 commit comments