servant-docs: Fix docsWith.
When adding extra info using using docsWith, the responses vanished from the output. This was due to combineAction being left-biased, and docsWith combining the extra info with the enpoint (in that order). Flipping combineAction solves this.
This commit is contained in:
parent
452ddf02e4
commit
3565641359
1 changed files with 1 additions and 1 deletions
|
@ -338,7 +338,7 @@ extraInfo p action =
|
|||
docsWith :: HasDocs layout => [DocIntro] -> ExtraInfo layout -> Proxy layout -> API
|
||||
docsWith intros (ExtraInfo endpoints) p =
|
||||
docs p & apiIntros <>~ intros
|
||||
& apiEndpoints %~ HM.unionWith combineAction endpoints
|
||||
& apiEndpoints %~ HM.unionWith (flip combineAction) endpoints
|
||||
|
||||
|
||||
-- | Generate the docs for a given API that implements 'HasDocs' with with any
|
||||
|
|
Loading…
Reference in a new issue