Skip to content

Commit

Permalink
refactor: Factor out composeList helper for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
georgefst committed Feb 2, 2023
1 parent 89fc6ae commit 3e6b335
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion primer-service/src/Primer/Server.hs
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,9 @@ openAPIInfo =
refParamSchemas params api =
api
& #components % #schemas %~ IOHM.insert name (toSchema $ Proxy @a)
& #paths %~ foldr ((.) . uncurry (flip adjustParam)) identity params
& #paths %~ composeList (map (uncurry $ flip adjustParam) params)
where
composeList = appEndo . foldMap' Endo
adjustParam paramName =
IOHM.adjust $
#post % mapped % #parameters % mapped %~ \case
Expand Down

0 comments on commit 3e6b335

Please sign in to comment.