diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
 # Changelog
 
+## [0.2.1.3] - 2024-07-26
+
+* Support for `autodocodec >=0.4`.
+
 ## [0.2.1.1] - 2022-07-21
 
 ### Added
diff --git a/autodocodec-openapi3.cabal b/autodocodec-openapi3.cabal
--- a/autodocodec-openapi3.cabal
+++ b/autodocodec-openapi3.cabal
@@ -5,7 +5,7 @@
 -- see: https://github.com/sol/hpack
 
 name:           autodocodec-openapi3
-version:        0.2.1.2
+version:        0.2.1.3
 synopsis:       Autodocodec interpreters for openapi3
 homepage:       https://github.com/NorfairKing/autodocodec#readme
 bug-reports:    https://github.com/NorfairKing/autodocodec/issues
@@ -34,7 +34,7 @@
       src
   build-depends:
       aeson
-    , autodocodec >=0.3.0.0
+    , autodocodec >=0.4.0.0
     , base >=4.7 && <5
     , insert-ordered-containers
     , lens
diff --git a/src/Autodocodec/OpenAPI/Schema.hs b/src/Autodocodec/OpenAPI/Schema.hs
--- a/src/Autodocodec/OpenAPI/Schema.hs
+++ b/src/Autodocodec/OpenAPI/Schema.hs
@@ -45,14 +45,22 @@
               }
       BoolCodec mname -> lift $ NamedSchema mname <$> declareSchema (Proxy :: Proxy Bool)
       StringCodec mname -> lift $ NamedSchema mname <$> declareSchema (Proxy :: Proxy Text)
+      IntegerCodec mname mBounds -> do
+        s <- lift $ declareSchema (Proxy :: Proxy Integer)
+        let addNumberBounds Bounds {..} s_ =
+              s_
+                { _schemaMinimum = fromInteger <$> boundsLower,
+                  _schemaMaximum = fromInteger <$> boundsUpper
+                }
+        pure $ NamedSchema mname $ addNumberBounds mBounds s
       NumberCodec mname mBounds -> do
         s <- lift $ declareSchema (Proxy :: Proxy Scientific)
-        let addNumberBounds NumberBounds {..} s_ =
+        let addNumberBounds Bounds {..} s_ =
               s_
-                { _schemaMinimum = Just numberBoundsLower,
-                  _schemaMaximum = Just numberBoundsUpper
+                { _schemaMinimum = boundsLower,
+                  _schemaMaximum = boundsUpper
                 }
-        pure $ NamedSchema mname $ maybe id addNumberBounds mBounds s
+        pure $ NamedSchema mname $ addNumberBounds mBounds s
       ArrayOfCodec mname c -> do
         itemsSchema <- go c
         itemsSchemaRef <- declareSpecificNamedSchemaRef itemsSchema
