File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -178,18 +178,6 @@ func getComputabilityFromConfig(computability config.Computability) ComputedOpti
178178 return Required
179179}
180180
181- func setCreateOnlyValue (attr * Attribute ) {
182- // CreateOnly plan modifier will not be applied for computed attributes
183- if attr .ComputedOptionalRequired == Computed || attr .ComputedOptionalRequired == ComputedOptional {
184- return
185- }
186-
187- // captures case of path param attributes (no present in request body) and properties which are only present in post request
188- if attr .ReqBodyUsage == OmitAlways || attr .ReqBodyUsage == OmitInUpdateBody {
189- attr .CreateOnly = true
190- }
191- }
192-
193181// ApplyTimeoutTransformation adds a timeout attribute to the resource schema if any operation has wait blocks.
194182func ApplyTimeoutTransformation (resource * Resource ) {
195183 ops := & resource .Operations
@@ -218,3 +206,15 @@ func ApplyTimeoutTransformation(resource *Resource) {
218206 })
219207 }
220208}
209+
210+ func setCreateOnlyValue (attr * Attribute ) {
211+ // CreateOnly plan modifier will not be applied for computed attributes
212+ if attr .ComputedOptionalRequired == Computed || attr .ComputedOptionalRequired == ComputedOptional {
213+ return
214+ }
215+
216+ // captures case of path param attributes (no present in request body) and properties which are only present in post request
217+ if attr .ReqBodyUsage == OmitAlways || attr .ReqBodyUsage == OmitInUpdateBody {
218+ attr .CreateOnly = true
219+ }
220+ }
You can’t perform that action at this time.
0 commit comments