Skip to content

Commit

Permalink
typo Compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsinai committed May 16, 2024
1 parent 8b53483 commit 3af5596
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/crd/crd.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func buildDeleteAction(crd v1.CustomResourceDefinition, invocation port.Invocati
return dltAct
}

func adjustSchemaToPortSchemaCompabtabilityLevel(spec *v1.JSONSchemaProps) {
func adjustSchemaToPortSchemaCompatibilityLevel(spec *v1.JSONSchemaProps) {
for i, v := range spec.Properties {
if v.Type == "integer" {
v.Type = "number"
Expand Down Expand Up @@ -185,7 +185,7 @@ func adjustSchemaToPortSchemaCompabtabilityLevel(spec *v1.JSONSchemaProps) {

for i, v := range spec.Properties {
if v.Type == "object" {
adjustSchemaToPortSchemaCompabtabilityLevel(&v)
adjustSchemaToPortSchemaCompatibilityLevel(&v)
spec.Properties[i] = v
}
}
Expand All @@ -207,7 +207,7 @@ func convertToPortSchemas(crd v1.CustomResourceDefinition) ([]port.Action, *port
spec = *latestCRDVersion.Schema.OpenAPIV3Schema
}

adjustSchemaToPortSchemaCompabtabilityLevel(&spec)
adjustSchemaToPortSchemaCompatibilityLevel(&spec)

bytes, err := json.Marshal(&spec)
if err != nil {
Expand Down

0 comments on commit 3af5596

Please sign in to comment.