Skip to content

Instantly share code, notes, and snippets.

@fizruk
Created March 21, 2017 08:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fizruk/aa52bd09cd0746277d71f2d9836b10f1 to your computer and use it in GitHub Desktop.
Save fizruk/aa52bd09cd0746277d71f2d9836b10f1 to your computer and use it in GitHub Desktop.
data Description (sym :: Symbol)
instance (KnownSymbol sym, HasSwagger api) => HasSwagger (Description sym :> api) where
toSwagger _ = toSwagger (Proxy :: Proxy api)
& allOperations.description ?~ desc
where
desc = symbolVal (Proxy :: Proxy sym)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment