diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
 # Changelog
 
+## [0.1.0.4] - 2024-06-23
+
+### Added
+
+* `Ord JSONSchema`
+* `Ord ObjectSchema`
+* `Ord KeyRequirement`
+
 ## [0.1.0.3] - 2023-01-18
 
 ### Changed
diff --git a/autodocodec-schema.cabal b/autodocodec-schema.cabal
--- a/autodocodec-schema.cabal
+++ b/autodocodec-schema.cabal
@@ -1,17 +1,17 @@
 cabal-version: 1.12
 
--- This file has been generated from package.yaml by hpack version 0.34.7.
+-- This file has been generated from package.yaml by hpack version 0.36.0.
 --
 -- see: https://github.com/sol/hpack
 
 name:           autodocodec-schema
-version:        0.1.0.3
+version:        0.1.0.4
 synopsis:       Autodocodec interpreters for JSON Schema
 homepage:       https://github.com/NorfairKing/autodocodec#readme
 bug-reports:    https://github.com/NorfairKing/autodocodec/issues
 author:         Tom Sydney Kerckhove
 maintainer:     syd@cs-syd.eu
-copyright:      2021-2022 Tom Sydney Kerckhove
+copyright:      2021-2024 Tom Sydney Kerckhove
 license:        MIT
 license-file:   LICENSE
 build-type:     Simple
diff --git a/src/Autodocodec/Schema.hs b/src/Autodocodec/Schema.hs
--- a/src/Autodocodec/Schema.hs
+++ b/src/Autodocodec/Schema.hs
@@ -48,14 +48,14 @@
   | ArraySchema !JSONSchema
   | MapSchema !JSONSchema
   | -- | This needs to be a list because keys should stay in their original ordering.
-    ObjectSchema ObjectSchema
+    ObjectSchema !ObjectSchema
   | ValueSchema !JSON.Value
   | AnyOfSchema !(NonEmpty JSONSchema)
   | OneOfSchema !(NonEmpty JSONSchema)
   | CommentSchema !Text !JSONSchema
   | RefSchema !Text
   | WithDefSchema !(Map Text JSONSchema) !JSONSchema
-  deriving (Show, Eq, Generic)
+  deriving (Show, Eq, Ord, Generic)
 
 instance Validity JSONSchema where
   validate js =
@@ -167,7 +167,7 @@
   | ObjectAnyOfSchema !(NonEmpty ObjectSchema)
   | ObjectOneOfSchema !(NonEmpty ObjectSchema)
   | ObjectAllOfSchema !(NonEmpty ObjectSchema)
-  deriving (Show, Eq, Generic)
+  deriving (Show, Eq, Ord, Generic)
 
 instance Validity ObjectSchema
 
@@ -304,11 +304,11 @@
 data KeyRequirement
   = Required
   | Optional !(Maybe JSON.Value) -- Default value
-  deriving (Show, Eq, Generic)
+  deriving (Show, Eq, Ord, Generic)
 
 instance Validity KeyRequirement
 
-jsonSchemaViaCodec :: forall a. HasCodec a => JSONSchema
+jsonSchemaViaCodec :: forall a. (HasCodec a) => JSONSchema
 jsonSchemaViaCodec = jsonSchemaVia (codec @a)
 
 jsonSchemaVia :: ValueCodec input output -> JSONSchema
