diff --git a/config/tests/samples/create/harness.go b/config/tests/samples/create/harness.go index 581b4ca36c..703a26537f 100644 --- a/config/tests/samples/create/harness.go +++ b/config/tests/samples/create/harness.go @@ -876,7 +876,7 @@ func MaybeSkip(t *testing.T, name string, resources []*unstructured.Unstructured case schema.GroupKind{Group: "vertexai.cnrm.cloud.google.com", Kind: "VertexAIEndpoint"}: default: - t.Skipf("gk %v not suppported by mock gcp %v; skipping", gvk.GroupKind(), name) + t.Skipf("gk %v not supported by mock gcp %v; skipping", gvk.GroupKind(), name) } } } @@ -928,7 +928,7 @@ func MaybeSkip(t *testing.T, name string, resources []*unstructured.Unstructured case "projectinorg": default: - t.Skipf("test %v not suppported by vcr; skipping", name) + t.Skipf("test %v not supported by vcr; skipping", name) } } } diff --git a/crds/bigquery_v1beta1_bigqueryroutine.yaml b/crds/bigquery_v1beta1_bigqueryroutine.yaml index e0255be863..a9513e0eeb 100644 --- a/crds/bigquery_v1beta1_bigqueryroutine.yaml +++ b/crds/bigquery_v1beta1_bigqueryroutine.yaml @@ -190,7 +190,7 @@ spec: If absent, the return table type is inferred from definitionBody at query time in each query that references this routine. If present, then the columns in the evaluated table result will - be cast to match the column types specificed in return table type, at query time. + be cast to match the column types specified in return table type, at query time. type: string returnType: description: |- @@ -199,8 +199,8 @@ spec: that references this routine. If present, then the evaluated result will be cast to the specified returned type at query time. ~>**NOTE**: Because this field expects a JSON string, any changes to the string will create a diff, even if the JSON itself hasn't - changed. If the API returns a different value for the same schema, e.g. it switche - d the order of values or replaced STRUCT field type with RECORD field type, we currently + changed. If the API returns a different value for the same schema, e.g. it switched + the order of values or replaced STRUCT field type with RECORD field type, we currently cannot suppress the recurring diff this causes. As a workaround, we recommend using the schema as returned by the API. type: string diff --git a/crds/compute_v1beta1_computeinstance.yaml b/crds/compute_v1beta1_computeinstance.yaml index 923c6b8e8a..9b38a106af 100644 --- a/crds/compute_v1beta1_computeinstance.yaml +++ b/crds/compute_v1beta1_computeinstance.yaml @@ -826,8 +826,8 @@ spec: type: string localSsdRecoveryTimeout: description: |- - Immutable. Specifies the maximum amount of time a Local Ssd Vm should wait while - recovery of the Local Ssd state is attempted. Its value should be in + Immutable. Specifies the maximum amount of time a Local SSD Vm should wait while + recovery of the Local SSD state is attempted. Its value should be in between 0 and 168 hours with hour granularity and the default value being 1 hour. properties: diff --git a/crds/compute_v1beta1_computeinstancetemplate.yaml b/crds/compute_v1beta1_computeinstancetemplate.yaml index 5dbdc71dd3..e4161a825d 100644 --- a/crds/compute_v1beta1_computeinstancetemplate.yaml +++ b/crds/compute_v1beta1_computeinstancetemplate.yaml @@ -839,8 +839,8 @@ spec: type: string localSsdRecoveryTimeout: description: |- - Specifies the maximum amount of time a Local Ssd Vm should wait while - recovery of the Local Ssd state is attempted. Its value should be in + Specifies the maximum amount of time a Local SSD Vm should wait while + recovery of the Local SSD state is attempted. Its value should be in between 0 and 168 hours with hour granularity and the default value being 1 hour. items: diff --git a/crds/compute_v1beta1_computenetwork.yaml b/crds/compute_v1beta1_computenetwork.yaml index e765e97689..a880aca4d8 100644 --- a/crds/compute_v1beta1_computenetwork.yaml +++ b/crds/compute_v1beta1_computenetwork.yaml @@ -100,8 +100,8 @@ spec: Immutable. When enabling ula internal ipv6, caller optionally can specify the /48 range they want from the google defined ULA prefix fd20::/20. The input must be a valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will - fail if the speficied /48 is already in used by another resource. - If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field. + fail if the specified /48 is already in used by another resource. + If the field is not specified, then a /48 range will be randomly allocated from fd20::/20 and returned via this field. type: string mtu: description: |- diff --git a/crds/compute_v1beta1_computeurlmap.yaml b/crds/compute_v1beta1_computeurlmap.yaml index f08c16618b..07c102ca0c 100644 --- a/crds/compute_v1beta1_computeurlmap.yaml +++ b/crds/compute_v1beta1_computeurlmap.yaml @@ -836,7 +836,7 @@ spec: type: object retryConditions: description: |- - Specfies one or more conditions when this retry rule applies. Valid values are: + Specifies one or more conditions when this retry rule applies. Valid values are: * 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, diff --git a/crds/dialogflowcx_v1alpha1_dialogflowcxflow.yaml b/crds/dialogflowcx_v1alpha1_dialogflowcxflow.yaml index 44b36c307b..dfd8cfa297 100644 --- a/crds/dialogflowcx_v1alpha1_dialogflowcxflow.yaml +++ b/crds/dialogflowcx_v1alpha1_dialogflowcxflow.yaml @@ -196,7 +196,7 @@ spec: - audioUri type: object telephonyTransferCall: - description: Represents the signal that telles the + description: Represents the signal that tells the client to transfer the phone call connected to the agent to a third-party endpoint. properties: @@ -438,7 +438,7 @@ spec: - audioUri type: object telephonyTransferCall: - description: Represents the signal that telles the + description: Represents the signal that tells the client to transfer the phone call connected to the agent to a third-party endpoint. properties: diff --git a/crds/dialogflowcx_v1alpha1_dialogflowcxpage.yaml b/crds/dialogflowcx_v1alpha1_dialogflowcxpage.yaml index 0ad67fcc28..7f5d94c332 100644 --- a/crds/dialogflowcx_v1alpha1_dialogflowcxpage.yaml +++ b/crds/dialogflowcx_v1alpha1_dialogflowcxpage.yaml @@ -165,7 +165,7 @@ spec: - audioUri type: object telephonyTransferCall: - description: Represents the signal that telles the client + description: Represents the signal that tells the client to transfer the phone call connected to the agent to a third-party endpoint. properties: @@ -339,7 +339,7 @@ spec: - audioUri type: object telephonyTransferCall: - description: Represents the signal that telles the + description: Represents the signal that tells the client to transfer the phone call connected to the agent to a third-party endpoint. properties: @@ -526,7 +526,7 @@ spec: - audioUri type: object telephonyTransferCall: - description: Represents the signal that telles + description: Represents the signal that tells the client to transfer the phone call connected to the agent to a third-party endpoint. properties: @@ -733,7 +733,7 @@ spec: type: object telephonyTransferCall: description: Represents the signal that - telles the client to transfer the + tells the client to transfer the phone call connected to the agent to a third-party endpoint. properties: @@ -986,7 +986,7 @@ spec: - audioUri type: object telephonyTransferCall: - description: Represents the signal that telles the + description: Represents the signal that tells the client to transfer the phone call connected to the agent to a third-party endpoint. properties: diff --git a/crds/networkservices_v1beta1_networkservicesgrpcroute.yaml b/crds/networkservices_v1beta1_networkservicesgrpcroute.yaml index 4a50ac0e3f..2db1959344 100644 --- a/crds/networkservices_v1beta1_networkservicesgrpcroute.yaml +++ b/crds/networkservices_v1beta1_networkservicesgrpcroute.yaml @@ -317,7 +317,7 @@ spec: properties: numRetries: description: Specifies the allowed number of retries. - This number must be > 0. If not specpfied, default + This number must be > 0. If not specified, default to 1. format: int64 type: integer diff --git a/docs/develop-resources/api-conventions/validations.md b/docs/develop-resources/api-conventions/validations.md index 8381d63525..c78039552c 100644 --- a/docs/develop-resources/api-conventions/validations.md +++ b/docs/develop-resources/api-conventions/validations.md @@ -134,7 +134,7 @@ This is the default behavior if using the direct autogenerated code. The code lo Some existing *v1beta1* resources allow optional `spec.projectRef`, where the project information comes from either the `cnrm.cloud.google.com/project-id` annotation, or the namespace annotation. -When migrating a Terraform-based or DCL-based resource to the direct approach, we want to continue supporitng this behavior for backward compatibility. You can check if the resource uses cnrm.cloud.google.com/project-id` annotation in its Google reference doc. +When migrating a Terraform-based or DCL-based resource to the direct approach, we want to continue supporting this behavior for backward compatibility. You can check if the resource uses cnrm.cloud.google.com/project-id` annotation in its Google reference doc. ## Rule 4: No `anyOf`, `oneOf`, or` allOf` diff --git a/docs/develop-resources/deep-dives/5-releases.md b/docs/develop-resources/deep-dives/5-releases.md index a34c670a43..a23ec4c2b8 100644 --- a/docs/develop-resources/deep-dives/5-releases.md +++ b/docs/develop-resources/deep-dives/5-releases.md @@ -23,7 +23,7 @@ * Add `kubebuilder:storageversion` tag to `v1beta1 `API. [example](https://github.com/GoogleCloudPlatform/k8s-config-connector/blob/1b19153411653329177f4ba0991c982f36970707/apis/cloudbuild/v1beta1/workerpool_types.go#L155) -* Run `dev/taks/generate-crds` to patch your resource's CRD with the `v1beta1` version. +* Run `dev/task/generate-crds` to patch your resource's CRD with the `v1beta1` version. ## 5.3 Turn on doc auto-generation (direct resource only) diff --git a/experiments/compositions/Design Notes/API Design.md b/experiments/compositions/Design Notes/API Design.md index e27cefd965..9ab3695c22 100644 --- a/experiments/compositions/Design Notes/API Design.md +++ b/experiments/compositions/Design Notes/API Design.md @@ -72,4 +72,4 @@ Q1. Should CRD_T be Namespace-scoped or Cluster-scoped ? Q2. Choice for CRD_V: Single CRD (Say CompositionValues) for all CRD_T's or Separate CRD for each CRD_T instance ? > Single CRD => Too generic typing, less scope for access control > Separate GVR => Better Access controls based on types, Structured API implies better error checking -> We choose to go with Seperate GVR, one per each CRD_T instance. +> We choose to go with Separate GVR, one per each CRD_T instance. diff --git a/experiments/compositions/Design Notes/Applier.md b/experiments/compositions/Design Notes/Applier.md index a353f7dc75..8e2c7d8d93 100644 --- a/experiments/compositions/Design Notes/Applier.md +++ b/experiments/compositions/Design Notes/Applier.md @@ -21,7 +21,7 @@ The pod can be as simple as a kubectl cli or a kpt-cli bundled in, or it can be Since it is not a persistent controller, we cannot implement drift correction. - Separate pod with kubectl or kpt-cli would take a dependency on an external project and involves security patches for a such image. -- Don't think we need a separate pod for security reasons yet. Separate reconciler per namespace should cover most secutrity concerns. +- Don't think we need a separate pod for security reasons yet. Separate reconciler per namespace should cover most security concerns. ## A persistent pod comms via grpc diff --git a/experiments/compositions/composition/release/crds.yaml b/experiments/compositions/composition/release/crds.yaml index dc8d781fc3..f49607256c 100644 --- a/experiments/compositions/composition/release/crds.yaml +++ b/experiments/compositions/composition/release/crds.yaml @@ -771,7 +771,7 @@ spec: description: PlanStatus defines the observed state of Plan properties: compositionGeneration: - description: Composition generation last succesfully reconciled + description: Composition generation last successfully reconciled format: int64 type: integer compositionUID: @@ -851,7 +851,7 @@ spec: format: int64 type: integer inputGeneration: - description: Facade's generation last succesfully reconciled + description: Facade's generation last successfully reconciled format: int64 type: integer lastPruned: diff --git a/experiments/compositions/composition/release/manifest.yaml b/experiments/compositions/composition/release/manifest.yaml index f48f4a8c1c..c490c3d411 100644 --- a/experiments/compositions/composition/release/manifest.yaml +++ b/experiments/compositions/composition/release/manifest.yaml @@ -784,7 +784,7 @@ spec: description: PlanStatus defines the observed state of Plan properties: compositionGeneration: - description: Composition generation last succesfully reconciled + description: Composition generation last successfully reconciled format: int64 type: integer compositionUID: @@ -864,7 +864,7 @@ spec: format: int64 type: integer inputGeneration: - description: Facade's generation last succesfully reconciled + description: Facade's generation last successfully reconciled format: int64 type: integer lastPruned: diff --git a/experiments/compositions/samples/AppTeam/README.md b/experiments/compositions/samples/AppTeam/README.md index cbad05e44c..ae2cbd5def 100644 --- a/experiments/compositions/samples/AppTeam/README.md +++ b/experiments/compositions/samples/AppTeam/README.md @@ -50,7 +50,7 @@ spec: EOF ``` -Verify the relevant resources are created succesfully +Verify the relevant resources are created successfully ``` ./get_appteam.sh ${TEAM_NAME} diff --git a/experiments/compositions/samples/CloudSQL/README.md b/experiments/compositions/samples/CloudSQL/README.md index 0f3ad29672..e0ac46a2f0 100644 --- a/experiments/compositions/samples/CloudSQL/README.md +++ b/experiments/compositions/samples/CloudSQL/README.md @@ -30,7 +30,7 @@ spec: EOF ``` -Verify the relevant resources are created succesfully by running: +Verify the relevant resources are created successfully by running: ``` ./get_cloudsql.sh ${NAMESPACE} diff --git a/mockgcp/mockkms/cryptokeyversion.go b/mockgcp/mockkms/cryptokeyversion.go index 1d962d5306..f701dbb0ba 100644 --- a/mockgcp/mockkms/cryptokeyversion.go +++ b/mockgcp/mockkms/cryptokeyversion.go @@ -181,10 +181,10 @@ func (r *kmsServer) DestroyCryptoKeyVersion(ctx context.Context, req *pb.Destroy parent = cryptoKey } - destroyScheuledDuration := parent.GetDestroyScheduledDuration().AsDuration() + destroyScheduledDuration := parent.GetDestroyScheduledDuration().AsDuration() obj.State = pb.CryptoKeyVersion_DESTROY_SCHEDULED - obj.DestroyTime = timestamppb.New(now.Add(destroyScheuledDuration)) + obj.DestroyTime = timestamppb.New(now.Add(destroyScheduledDuration)) if err := r.storage.Update(ctx, fqn, obj); err != nil { return nil, err diff --git a/operator/pkg/controllers/configconnector/configconnector_controller.go b/operator/pkg/controllers/configconnector/configconnector_controller.go index bd4b4cfe99..279ccd4049 100644 --- a/operator/pkg/controllers/configconnector/configconnector_controller.go +++ b/operator/pkg/controllers/configconnector/configconnector_controller.go @@ -247,7 +247,7 @@ func (r *Reconciler) handleConfigConnectorLifecycle() declarative.ObjectTransfor if err := r.client.Update(ctx, cc); err != nil { return fmt.Errorf("error adding %v finalizer in ConfigConnector object %v: %w", k8s.OperatorFinalizer, cc.GetName(), err) } - // Create the cnrm-systm namespace first; this is done to prevent the creation of components from failing due to the cnrm-system namespace not existing yet. + // Create the cnrm-system namespace first; this is done to prevent the creation of components from failing due to the cnrm-system namespace not existing yet. if err := createCNRMSystemNamespace(ctx, r.client, m); err != nil { return fmt.Errorf("error creating %v namespace: %w", k8s.CNRMSystemNamespace, err) } diff --git a/pkg/cli/gcpclient/resolve_apiserver_dependencies_test.go b/pkg/cli/gcpclient/resolve_apiserver_dependencies_test.go index f302e916d9..f69c5d44fd 100644 --- a/pkg/cli/gcpclient/resolve_apiserver_dependencies_test.go +++ b/pkg/cli/gcpclient/resolve_apiserver_dependencies_test.go @@ -108,7 +108,7 @@ func convertSensitiveFieldsToValue(t *testing.T, resources []*unstructured.Unstr field.Value = &value var newValue map[string]interface{} if err := util.Marshal(field, &newValue); err != nil { - t.Fatalf("error marshalling SenesitiveField '%v' to a object map: %v", field, err) + t.Fatalf("error marshalling SensitiveField '%v' to a object map: %v", field, err) } mapValue := obj.(map[string]interface{}) for k := range mapValue { diff --git a/pkg/cli/stream/yamlstream.go b/pkg/cli/stream/yamlstream.go index b30b010910..133e3bb675 100644 --- a/pkg/cli/stream/yamlstream.go +++ b/pkg/cli/stream/yamlstream.go @@ -25,7 +25,7 @@ import ( ) var ( - yamlSeperator = []byte("---\n") + yamlSeparator = []byte("---\n") // YAML streams are terminated with "..." which signifies the end of transmission: https://yaml.org/spec/1.2/spec.html yamlTransmissionTerminator = []byte("...") ) @@ -76,7 +76,7 @@ func (y *YAMLStream) Next(ctx context.Context) ([]byte, *unstructured.Unstructur y.nextErr = nil return nil, nil, err } - bytes = append(yamlSeperator, bytes...) + bytes = append(yamlSeparator, bytes...) y.fillNext(ctx) y.returnedAtLeastOneNonErrorResult = true return bytes, unstructured, nil diff --git a/pkg/controller/direct/compute/forwardingrule/mapper.generated.go b/pkg/controller/direct/compute/forwardingrule/mapper.generated.go index dcb91047c4..fe67192733 100644 --- a/pkg/controller/direct/compute/forwardingrule/mapper.generated.go +++ b/pkg/controller/direct/compute/forwardingrule/mapper.generated.go @@ -31,7 +31,7 @@ func ComputeForwardingRuleSpec_FromProto(mapCtx *direct.MapContext, in *pb.Forwa out.AllPorts = in.AllPorts out.AllowGlobalAccess = in.AllowGlobalAccess out.AllowPscGlobalAccess = in.AllowPscGlobalAccess - out.BackendServiceRef = ComputeForwardingRuleSpec_BackendSeriviceRef_FromProto(mapCtx, in.GetBackendService()) + out.BackendServiceRef = ComputeForwardingRuleSpec_BackendServiceRef_FromProto(mapCtx, in.GetBackendService()) // MISSING: BaseForwardingRule // MISSING: CreationTimestamp out.Description = in.Description @@ -73,7 +73,7 @@ func ComputeForwardingRuleSpec_ToProto(mapCtx *direct.MapContext, in *krm.Comput out.AllPorts = in.AllPorts out.AllowGlobalAccess = in.AllowGlobalAccess out.AllowPscGlobalAccess = in.AllowPscGlobalAccess - out.BackendService = ComputeForwardingRuleSpec_BackendSeriviceRef_ToProto(mapCtx, in.BackendServiceRef) + out.BackendService = ComputeForwardingRuleSpec_BackendServiceRef_ToProto(mapCtx, in.BackendServiceRef) // MISSING: BaseForwardingRule // MISSING: CreationTimestamp out.Description = in.Description diff --git a/pkg/controller/direct/compute/forwardingrule/mapper.go b/pkg/controller/direct/compute/forwardingrule/mapper.go index 2c346d8202..e9657a232e 100644 --- a/pkg/controller/direct/compute/forwardingrule/mapper.go +++ b/pkg/controller/direct/compute/forwardingrule/mapper.go @@ -52,7 +52,7 @@ func ComputeForwardingRuleSpec_IpAddress_FromProto(mapCtx *direct.MapContext, in return out } -func ComputeForwardingRuleSpec_BackendSeriviceRef_FromProto(mapCtx *direct.MapContext, in string) *refs.ComputeBackendServiceRef { +func ComputeForwardingRuleSpec_BackendServiceRef_FromProto(mapCtx *direct.MapContext, in string) *refs.ComputeBackendServiceRef { if in == "" { return nil } @@ -61,7 +61,7 @@ func ComputeForwardingRuleSpec_BackendSeriviceRef_FromProto(mapCtx *direct.MapCo } } -func ComputeForwardingRuleSpec_BackendSeriviceRef_ToProto(mapCtx *direct.MapContext, in *refs.ComputeBackendServiceRef) *string { +func ComputeForwardingRuleSpec_BackendServiceRef_ToProto(mapCtx *direct.MapContext, in *refs.ComputeBackendServiceRef) *string { if in == nil { return nil } diff --git a/pkg/controller/direct/resourcemanager/tagkey_controller.go b/pkg/controller/direct/resourcemanager/tagkey_controller.go index 794b34a028..568983d78f 100644 --- a/pkg/controller/direct/resourcemanager/tagkey_controller.go +++ b/pkg/controller/direct/resourcemanager/tagkey_controller.go @@ -246,7 +246,7 @@ func (a *tagKeyAdapter) Update(ctx context.Context, updateOp *directbase.UpdateO if _, err := op.Wait(ctx); err != nil { return fmt.Errorf("tagKey update failed: %w", err) } - // TODO: Do we need to check that the operation succeeeded? + // TODO: Do we need to check that the operation succeeded? } // TODO: Return updated object status diff --git a/pkg/controller/iam/iamclient/iamclient.go b/pkg/controller/iam/iamclient/iamclient.go index 0b7fbb4fdc..038b239948 100644 --- a/pkg/controller/iam/iamclient/iamclient.go +++ b/pkg/controller/iam/iamclient/iamclient.go @@ -51,7 +51,7 @@ const ( IAMGroup = "iam.cnrm.cloud.google.com" IAMVersion = "v1beta1" - SerivceIdentityKind = "ServiceIdentity" + ServiceIdentityKind = "ServiceIdentity" ServiceUsageGroup = "serviceusage.cnrm.cloud.google.com" ServiceUsageVersion = "v1beta1" ) @@ -83,7 +83,7 @@ var ( ServiceIdentityGVK = schema.GroupVersionKind{ Group: ServiceUsageGroup, Version: ServiceUsageVersion, - Kind: SerivceIdentityKind, + Kind: ServiceIdentityKind, } ) diff --git a/pkg/dcl/conversion/converter_test.go b/pkg/dcl/conversion/converter_test.go index 503a41c483..1cf451f60e 100644 --- a/pkg/dcl/conversion/converter_test.go +++ b/pkg/dcl/conversion/converter_test.go @@ -1286,7 +1286,7 @@ func TestConverter_DCLObjectToKRMObject(t *testing.T) { // Read-only sensitive and reference fields are // surfaced onto the spec if they're part of // objects within collections (maps, arrays) - // and simply srufaced as strings rather than + // and simply surfaced as strings rather than // sensitive or reference structs. "readOnlySensitiveField": "sensitiveVal", "readOnlyReferenceField": "referenceVal", @@ -1487,7 +1487,7 @@ func TestConverter_DCLObjectToKRMObject(t *testing.T) { // Read-only sensitive and reference fields are // surfaced onto the spec if they're part of // objects within collections (maps, arrays) - // and simply srufaced as strings rather than + // and simply surfaced as strings rather than // sensitive or reference structs. "readOnlySensitiveField": "sensitiveVal", "readOnlyReferenceField": "referenceVal", diff --git a/pkg/dcl/kcclite/conversion.go b/pkg/dcl/kcclite/conversion.go index 64547e6a3e..74b9f510d7 100644 --- a/pkg/dcl/kcclite/conversion.go +++ b/pkg/dcl/kcclite/conversion.go @@ -93,7 +93,7 @@ func convertConfig(config map[string]interface{}, path []string, schema *openapi return config, nil } if schema.Type != "object" { - return nil, fmt.Errorf("expect the schame type to be 'object', but got %v", schema.Type) + return nil, fmt.Errorf("expect the schema type to be 'object', but got %v", schema.Type) } for f, s := range schema.Properties { if dclextension.IsReferenceField(s) { diff --git a/pkg/webhook/immutable_fields_validator.go b/pkg/webhook/immutable_fields_validator.go index 94d3376358..d9e9f7a8e8 100644 --- a/pkg/webhook/immutable_fields_validator.go +++ b/pkg/webhook/immutable_fields_validator.go @@ -178,7 +178,7 @@ func validateImmutableFieldsForDCLBasedResource(obj, oldObj *unstructured.Unstru func getChangesOnImmutableFields(spec, oldSpec map[string]interface{}, krmPath, dclPath []string, schema *openapi.Schema, hierarchicalRefs []corekccv1alpha1.HierarchicalReference) ([]string, error) { if schema.Type != "object" { - return nil, fmt.Errorf("expect the schame type to be 'object', but got %v", schema.Type) + return nil, fmt.Errorf("expect the schema type to be 'object', but got %v", schema.Type) } ret := make([]string, 0) for f, s := range schema.Properties {