-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Document additionalProperties bug, fix parens on mapOf
Co-authored-by: Owen <[email protected]>
- Loading branch information
1 parent
9eb6d4b
commit e2f34ed
Showing
8 changed files
with
98 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...e-openapi3/examples/test-cases/TestCases/Types/JustAdditionalPropertiesNullableBoolean.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{-# LANGUAGE NoImplicitPrelude #-} | ||
|
||
module TestCases.Types.JustAdditionalPropertiesNullableBoolean | ||
( JustAdditionalPropertiesNullableBoolean(..) | ||
, justAdditionalPropertiesNullableBooleanSchema | ||
) where | ||
|
||
import qualified Data.Map as Map | ||
import qualified Data.Text as T | ||
import qualified Fleece.Core as FC | ||
import Prelude (Eq, Show) | ||
import qualified TestCases.Types.JustAdditionalPropertiesNullableBooleanItem as JustAdditionalPropertiesNullableBooleanItem | ||
|
||
newtype JustAdditionalPropertiesNullableBoolean = JustAdditionalPropertiesNullableBoolean (Map.Map T.Text JustAdditionalPropertiesNullableBooleanItem.JustAdditionalPropertiesNullableBooleanItem) | ||
deriving (Show, Eq) | ||
|
||
justAdditionalPropertiesNullableBooleanSchema :: FC.Fleece schema => schema JustAdditionalPropertiesNullableBoolean | ||
justAdditionalPropertiesNullableBooleanSchema = | ||
FC.coerceSchema (FC.map JustAdditionalPropertiesNullableBooleanItem.justAdditionalPropertiesNullableBooleanItemSchema) |
16 changes: 16 additions & 0 deletions
16
...enapi3/examples/test-cases/TestCases/Types/JustAdditionalPropertiesNullableBooleanItem.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{-# LANGUAGE NoImplicitPrelude #-} | ||
|
||
module TestCases.Types.JustAdditionalPropertiesNullableBooleanItem | ||
( JustAdditionalPropertiesNullableBooleanItem(..) | ||
, justAdditionalPropertiesNullableBooleanItemSchema | ||
) where | ||
|
||
import qualified Fleece.Core as FC | ||
import Prelude (Bool, Eq, Show) | ||
|
||
newtype JustAdditionalPropertiesNullableBooleanItem = JustAdditionalPropertiesNullableBooleanItem Bool | ||
deriving (Show, Eq) | ||
|
||
justAdditionalPropertiesNullableBooleanItemSchema :: FC.Fleece schema => schema JustAdditionalPropertiesNullableBooleanItem | ||
justAdditionalPropertiesNullableBooleanItemSchema = | ||
FC.coerceSchema FC.boolean |
19 changes: 19 additions & 0 deletions
19
...penapi3/examples/test-cases/TestCases/Types/JustAdditionalPropertiesNullableBooleanRef.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{-# LANGUAGE NoImplicitPrelude #-} | ||
|
||
module TestCases.Types.JustAdditionalPropertiesNullableBooleanRef | ||
( JustAdditionalPropertiesNullableBooleanRef(..) | ||
, justAdditionalPropertiesNullableBooleanRefSchema | ||
) where | ||
|
||
import qualified Data.Map as Map | ||
import qualified Data.Text as T | ||
import qualified Fleece.Core as FC | ||
import Prelude (Either, Eq, Show) | ||
import qualified TestCases.Types.NullableBoolean as NullableBoolean | ||
|
||
newtype JustAdditionalPropertiesNullableBooleanRef = JustAdditionalPropertiesNullableBooleanRef (Map.Map T.Text (Either FC.Null NullableBoolean.NullableBoolean)) | ||
deriving (Show, Eq) | ||
|
||
justAdditionalPropertiesNullableBooleanRefSchema :: FC.Fleece schema => schema JustAdditionalPropertiesNullableBooleanRef | ||
justAdditionalPropertiesNullableBooleanRefSchema = | ||
FC.coerceSchema (FC.map (FC.nullable NullableBoolean.nullableBooleanSchema)) |
16 changes: 16 additions & 0 deletions
16
json-fleece-openapi3/examples/test-cases/TestCases/Types/NullableBoolean.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{-# LANGUAGE NoImplicitPrelude #-} | ||
|
||
module TestCases.Types.NullableBoolean | ||
( NullableBoolean(..) | ||
, nullableBooleanSchema | ||
) where | ||
|
||
import qualified Fleece.Core as FC | ||
import Prelude (Bool, Eq, Show) | ||
|
||
newtype NullableBoolean = NullableBoolean Bool | ||
deriving (Show, Eq) | ||
|
||
nullableBooleanSchema :: FC.Fleece schema => schema NullableBoolean | ||
nullableBooleanSchema = | ||
FC.coerceSchema FC.boolean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters