packages feed

autodocodec-schema 0.1.0.3 → 0.1.0.4

raw patch · 3 files changed

+16/−8 lines, 3 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

+ Autodocodec.Schema: instance GHC.Classes.Ord Autodocodec.Schema.JSONSchema
+ Autodocodec.Schema: instance GHC.Classes.Ord Autodocodec.Schema.KeyRequirement
+ Autodocodec.Schema: instance GHC.Classes.Ord Autodocodec.Schema.ObjectSchema
- Autodocodec.Schema: ObjectSchema :: ObjectSchema -> JSONSchema
+ Autodocodec.Schema: ObjectSchema :: !ObjectSchema -> JSONSchema

Files

CHANGELOG.md view
@@ -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
autodocodec-schema.cabal view
@@ -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
src/Autodocodec/Schema.hs view
@@ -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