Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for SupportsQueryParam (0.15 sec)

  1. staging/src/k8s.io/cli-runtime/pkg/resource/query_param_verifier.go

    	oapi, err := v.openAPIGetter.OpenAPISchema()
    	if err != nil {
    		return fmt.Errorf("failed to download openapi: %v", err)
    	}
    	supports, err := supportsQueryParam(oapi, gvk, v.queryParam)
    	if err != nil {
    		// We assume that we couldn't find the type, then check for namespace:
    		supports, _ = supportsQueryParam(oapi, schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Namespace"}, v.queryParam)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 18 01:23:27 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  2. staging/src/k8s.io/cli-runtime/pkg/resource/query_param_verifier_test.go

    	} {
    		t.Run(name, func(t *testing.T) {
    			for _, test := range tests {
    				supports, err := supportsQueryParam(doc, test.gvk, test.queryParam)
    				if supports != test.supports || ((err == nil) != test.success) {
    					errStr := "nil"
    					if test.success == false {
    						errStr = "err"
    					}
    					t.Errorf("SupportsQueryParam(doc, %v, %v) = (%v, %v), expected (%v, %v)",
    						test.gvk, test.queryParam,
    						supports, err,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 18 01:23:27 UTC 2023
    - 5.3K bytes
    - Viewed (0)
  3. staging/src/k8s.io/cli-runtime/pkg/resource/query_param_verifier_v3.go

    	if err != nil {
    		return false
    	}
    	if oapiGVK["group"] == gvk.Group &&
    		oapiGVK["version"] == gvk.Version &&
    		oapiGVK["kind"] == gvk.Kind {
    		return true
    	}
    	return false
    }
    
    // supportsQueryParam is a method that let's us look in the OpenAPI if the
    // specific group-version-kind supports the specific query parameter for
    // the PATCH end-point. Returns nil if the passed GVK supports the passed
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 18 01:23:27 UTC 2023
    - 5.3K bytes
    - Viewed (0)
Back to top