diff --git a/json-spec-openapi.cabal b/json-spec-openapi.cabal
--- a/json-spec-openapi.cabal
+++ b/json-spec-openapi.cabal
@@ -1,11 +1,11 @@
 cabal-version:       3.0
 name:                json-spec-openapi
-version:             0.1.0.0
+version:             0.1.0.1
 synopsis:            json-spec-openapi
 description:
   This package provides a way to produce
-  [`openapi3`](https://hackage.haskell.org/package/openapi3) documentation from a
-  [`json-spec`](https://hackage.haskell.org/package/json-spec-0.1.0.0)
+  [openapi3](https://hackage.haskell.org/package/openapi3) documentation from a
+  [json-spec](https://hackage.haskell.org/package/json-spec-0.1.0.0)
   specification.
 
   = Example
@@ -62,6 +62,7 @@
 
 common dependencies
   build-depends:
+    , aeson     >= 2.1.2.1 && < 2.2
     , base      >= 4.17    && < 4.18
     , json-spec >= 0.1.0.0 && < 0.2
     , lens      >= 5.2.2   && < 5.3
diff --git a/src/Data/JsonSpec/OpenApi.hs b/src/Data/JsonSpec/OpenApi.hs
--- a/src/Data/JsonSpec/OpenApi.hs
+++ b/src/Data/JsonSpec/OpenApi.hs
@@ -98,21 +98,25 @@
 
 
 import Control.Lens (At(at), (&), over, set)
+import Data.Aeson (ToJSON(toJSON))
 import Data.JsonSpec (HasJsonDecodingSpec(DecodingSpec),
   HasJsonEncodingSpec(EncodingSpec), Specification(JsonArray, JsonBool,
-  JsonDateTime, JsonInt, JsonNum, JsonObject, JsonString))
+  JsonDateTime, JsonEither, JsonInt, JsonNum, JsonObject, JsonString,
+  JsonTag))
 import Data.OpenApi (AdditionalProperties(AdditionalPropertiesAllowed),
-  HasAdditionalProperties(additionalProperties),
-  HasFormat(format), HasItems(items), HasProperties(properties),
-  HasRequired(required), HasType(type_), NamedSchema(NamedSchema),
-  OpenApiItems(OpenApiItemsObject), OpenApiType(OpenApiArray,
-  OpenApiBoolean, OpenApiInteger, OpenApiNumber, OpenApiObject,
-  OpenApiString), Referenced(Inline), ToSchema(declareNamedSchema),
-  Schema)
+  HasAdditionalProperties(additionalProperties), HasEnum(enum_),
+  HasFormat(format), HasItems(items), HasOneOf(oneOf),
+  HasProperties(properties), HasRequired(required), HasType(type_),
+  NamedSchema(NamedSchema), OpenApiItems(OpenApiItemsObject),
+  OpenApiType(OpenApiArray, OpenApiBoolean, OpenApiInteger,
+  OpenApiNumber, OpenApiObject, OpenApiString), Referenced(Inline),
+  ToSchema(declareNamedSchema), Schema)
 import Data.String (IsString(fromString))
 import Data.Text (Text)
 import Data.Typeable (Proxy(Proxy), Typeable)
 import GHC.TypeLits (KnownSymbol, symbolVal)
+import Prelude (Applicative(pure), Bool(False), Maybe(Just, Nothing),
+  Monoid(mempty), ($))
 
 
 {-|
@@ -146,9 +150,21 @@
 
   -}
   internal :: Proxy spec -> Schema
+instance (KnownSymbol tag) => Internal ('JsonTag tag) where
+  internal _ =
+    mempty & set enum_ (Just [toJSON (sym @tag :: Text)])
+
 instance Internal 'JsonString where
   internal _ =
     mempty & set type_ (Just OpenApiString)
+instance (Internal left, Internal right) => Internal ('JsonEither left right) where
+  internal _ =
+    mempty
+      & set oneOf (Just
+          [ Inline (internal (Proxy @left))
+          , Inline (internal (Proxy @right))
+          ]
+      )
 instance Internal 'JsonNum where
   internal _ =
     mempty & set type_ (Just OpenApiNumber)
@@ -213,7 +229,7 @@
 {-|
   Helper for defining `ToSchema` instances based on `HasJsonDecodingSpec`
   using @deriving via@.
-  
+
   Example:
 
   > data MyType = ...
diff --git a/test/test.hs b/test/test.hs
--- a/test/test.hs
+++ b/test/test.hs
@@ -11,16 +11,18 @@
 module Main (main) where
 
 import Control.Lens (At(at), (&), set)
-import Data.Aeson (FromJSON, ToJSON, encode)
+import Data.Aeson (FromJSON, ToJSON, encode, toJSON)
 import Data.JsonSpec (Field(Field), HasJsonDecodingSpec(DecodingSpec,
   fromJSONStructure), HasJsonEncodingSpec(EncodingSpec, toJSONStructure),
   SpecJSON(SpecJSON), Specification(JsonArray, JsonBool, JsonDateTime,
-  JsonNum, JsonObject, JsonString))
+  JsonEither, JsonNum, JsonObject, JsonString, JsonTag))
 import Data.JsonSpec.OpenApi (EncodingSchema, toOpenApiSchema)
 import Data.OpenApi (ToSchema)
 import Data.Proxy (Proxy(Proxy))
 import Data.Text (Text)
 import Data.Time (UTCTime)
+import Prelude (Applicative(pure), Bool(False), Maybe(Just),
+  Monoid(mempty), ($), Eq, IO, Show)
 import Test.Hspec (describe, hspec, it, shouldBe)
 import qualified Data.OpenApi as OA
 
@@ -40,6 +42,64 @@
         in
           actual `shouldBe` expected
 
+      it "sum" $
+        let
+          actual :: OA.Schema
+          actual =
+            toOpenApiSchema (Proxy @(
+              JsonEither
+                (
+                  JsonObject
+                    '[ '("tag", JsonTag "a")
+                     , '("content", JsonString)
+                     ]
+                )
+                (
+                  JsonObject
+                    '[ '("tag", JsonTag "b")
+                     , '("content", JsonString)
+                     ]
+                )
+            ))
+
+          expected :: OA.Schema
+          expected =
+            mempty
+              & set OA.oneOf (Just
+                [ OA.Inline $
+                    mempty
+                      & set OA.type_ (Just OA.OpenApiObject)
+                      & set OA.properties (
+                          mempty
+                            & set (at "tag") (Just (OA.Inline (
+                                mempty & set OA.enum_ (Just [toJSON ("a" :: Text)])
+                              )))
+                            & set (at "content") (Just (OA.Inline stringSchema))
+                        )
+                      & set OA.required ["tag", "content"]
+                      & set
+                          OA.additionalProperties
+                          (Just (OA.AdditionalPropertiesAllowed False))
+                , OA.Inline $
+                    mempty
+                      & set OA.type_ (Just OA.OpenApiObject)
+                      & set OA.properties (
+                          mempty
+                            & set (at "tag") (Just (OA.Inline (
+                                mempty & set OA.enum_ (Just [toJSON ("b" :: Text)])
+                              )))
+                            & set (at "content") (Just (OA.Inline stringSchema))
+                        )
+                      & set OA.required ["tag", "content"]
+                      & set
+                          OA.additionalProperties
+                          (Just (OA.AdditionalPropertiesAllowed False))
+                ]
+              )
+        in
+          actual `shouldBe` expected
+
+
       it "object" $
         let
           actual :: OA.Schema
@@ -129,7 +189,7 @@
       it "date-time" $
         let
           actual :: OA.Schema
-          actual = 
+          actual =
             toOpenApiSchema (Proxy @JsonDateTime)
 
           expected :: OA.Schema
