Skip to content

Commit

Permalink
rename field
Browse files Browse the repository at this point in the history
  • Loading branch information
hughsimpson committed Jun 24, 2024
1 parent 63b7f96 commit 7baae5e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ case class GeneratedEndpoint(name: String, definition: String, maybeLocalEnums:
case class GeneratedEndpointsForFile(maybeFileName: Option[String], generatedEndpoints: Seq[GeneratedEndpoint])

case class GeneratedEndpoints(
namesBodiesAndEnums: Seq[GeneratedEndpointsForFile],
namesAndParamsByFile: Seq[GeneratedEndpointsForFile],
queryParamRefs: Set[String],
jsonParamRefs: Set[String],
definesEnumQueryParam: Boolean
) {
def merge(that: GeneratedEndpoints): GeneratedEndpoints =
GeneratedEndpoints(
(namesBodiesAndEnums ++ that.namesBodiesAndEnums)
(namesAndParamsByFile ++ that.namesAndParamsByFile)
.groupBy(_.maybeFileName)
.map { case (fileName, endpoints) => GeneratedEndpointsForFile(fileName, endpoints.map(_.generatedEndpoints).reduce(_ ++ _)) }
.toSeq,
Expand Down

0 comments on commit 7baae5e

Please sign in to comment.