diff --git a/aeson-injector.cabal b/aeson-injector.cabal
--- a/aeson-injector.cabal
+++ b/aeson-injector.cabal
@@ -1,5 +1,5 @@
 name:                aeson-injector
-version:             1.0.2.0
+version:             1.0.3.0
 synopsis:            Injecting fields into aeson values
 description:         See README.md
 license:             MIT
@@ -36,6 +36,7 @@
     , swagger2             >= 2.0   && < 3.0
     , text                 >= 1.2   && < 2.0
     , unordered-containers >= 0.2.7 && < 0.3
+    , servant-docs         >= 0.7   && < 0.9
 
 test-suite test-aeson-injector
   default-language: Haskell2010
diff --git a/src/Data/Aeson/WithField.hs b/src/Data/Aeson/WithField.hs
--- a/src/Data/Aeson/WithField.hs
+++ b/src/Data/Aeson/WithField.hs
@@ -169,6 +169,7 @@
 import Data.Swagger 
 import GHC.Generics 
 import GHC.TypeLits 
+import Servant.Docs 
 
 import qualified Data.HashMap.Strict as H 
 import qualified Data.Text as T 
@@ -206,6 +207,12 @@
 -- behaves as it is 'a' but with additional 'id' field.
 type WithId i a = WithField "id" i a 
 
+instance (ToSample a, ToSample b) => ToSample (WithField s a b) where 
+  toSamples _ = samples $ WithField <$> as <*> bs 
+    where 
+    as = snd <$> toSamples (Proxy :: Proxy a)
+    bs = snd <$> toSamples (Proxy :: Proxy b)
+
 -- | Note: the instance injects field only in 'Object' case.
 -- In other cases it forms a wrapper around the 'Value' produced 
 -- by 'toJSON' of inner 'b' body.
@@ -286,6 +293,11 @@
 instance Bifunctor WithFields where 
   bimap fa fb (WithFields a b) = WithFields (fa a) (fb b)
 
+instance (ToSample a, ToSample b) => ToSample (WithFields a b) where 
+  toSamples _ = samples $ WithFields <$> as <*> bs 
+    where 
+    as = snd <$> toSamples (Proxy :: Proxy a)
+    bs = snd <$> toSamples (Proxy :: Proxy b)
 
 -- | Note: the instance injects field only in 'Object' case.
 -- In other cases it forms a wrapper around the 'Value' produced 
@@ -372,6 +384,11 @@
 
 instance Functor (OnlyField s) where 
   fmap f (OnlyField a) = OnlyField (f a)
+
+instance ToSample a => ToSample (OnlyField s a) where 
+  toSamples _ = samples $ OnlyField <$> as
+    where 
+    as = snd <$> toSamples (Proxy :: Proxy a)
 
 instance (KnownSymbol s, ToJSON a) => ToJSON (OnlyField s a) where 
   toJSON (OnlyField a) = object [ field .= a ]
