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 (#4465)
  • Loading branch information
stephybun authored Oct 9, 2024
1 parent a9c74d5 commit 40370f5
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 40370f5

Please sign in to comment.