Skip to content

Commit

Permalink
normalize example value in resource ID user specified segment to prev…
Browse files Browse the repository at this point in the history
…ent erroneous diffs
  • Loading branch information
stephybun committed Oct 4, 2024
1 parent 323a7ef commit 9e1d539
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ func (workaroundInconsistentlyDefinedSegments) Process(apiDefinition importerMod
val.Name = singularNameOfPrevious
if !strings.HasSuffix(val.Name, "Name") {
val.Name = fmt.Sprintf("%sName", singularNameOfPrevious)
// the parser sets the same value into Name and ExampleValue so this needs to be applied to ExampleValue as well
val.ExampleValue = fmt.Sprintf("%sName", singularNameOfPrevious)
}
}
}
Expand Down

0 comments on commit 9e1d539

Please sign in to comment.