Skip to content

Commit

Permalink
docs: Document limitations of OpenAPI inlined type schemas workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
georgefst committed Feb 2, 2023
1 parent 3e6b335 commit 88c7b8a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions primer-service/src/Primer/Server.hs
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ openAPIInfo =
Given a type, and some query parameters of that type,
this ensures that the specification of each parameter references a common schema,
instead of inlining it.
This could be made more general, (visit non-POST endpoints,
modify `show . typeRep` output when it contains `'` to match `openapi3`,
search by schema shape so that we don't have to manually enumerate use sites),
but _hopefully_ this will just be fixed upstream before we have to worry about any of that.
-}
refParamSchemas :: forall a. ToSchema a => [(FilePath, Text)] -> OpenApi -> OpenApi
refParamSchemas params api =
Expand Down

0 comments on commit 88c7b8a

Please sign in to comment.