Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
refactor: don't set order and colspan while schema.yaml existed
Browse files Browse the repository at this point in the history
  • Loading branch information
aiwantaozi authored and gitlawr committed Nov 24, 2023
1 parent 984a6c5 commit 030339a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pkg/templates/loader/terraform_loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,14 @@ func (l *TerraformLoader) applyMissingConfig(generated, customized *openapi3.Sch
)

ext.WithOriginal(in.Value.Extensions[openapi.ExtOriginalKey])
ext.WithUIOrder(genExt.Order)
ext.WithUIColSpan(genExt.ColSpan)

if ext.ExtUI.Order == 0 {
ext.WithUIOrder(genExt.Order)
}

if ext.ExtUI.ColSpan == 0 {
ext.WithUIColSpan(genExt.ColSpan)
}

s.Properties[n].Value.Extensions = ext.Export()
}
Expand Down

0 comments on commit 030339a

Please sign in to comment.