-
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.
Merge branch 'tbaum/ingore-additional-properties'
- Loading branch information
Showing
12 changed files
with
229 additions
and
106 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
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
25 changes: 25 additions & 0 deletions
25
json-fleece-openapi3/examples/test-cases/TestCases/Types/MixedInAdditionalPropertiesFalse.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,25 @@ | ||
{-# LANGUAGE NoImplicitPrelude #-} | ||
|
||
module TestCases.Types.MixedInAdditionalPropertiesFalse | ||
( MixedInAdditionalPropertiesFalse(..) | ||
, mixedInAdditionalPropertiesFalseSchema | ||
) where | ||
|
||
import Fleece.Core ((#+)) | ||
import qualified Fleece.Core as FC | ||
import Prelude (($), Eq, Maybe, Show) | ||
import qualified TestCases.Types.MixedInAdditionalPropertiesFalse.Bar as Bar | ||
import qualified TestCases.Types.MixedInAdditionalPropertiesFalse.Foo as Foo | ||
|
||
data MixedInAdditionalPropertiesFalse = MixedInAdditionalPropertiesFalse | ||
{ bar :: Maybe Bar.Bar | ||
, foo :: Maybe Foo.Foo | ||
} | ||
deriving (Eq, Show) | ||
|
||
mixedInAdditionalPropertiesFalseSchema :: FC.Fleece schema => schema MixedInAdditionalPropertiesFalse | ||
mixedInAdditionalPropertiesFalseSchema = | ||
FC.object $ | ||
FC.constructor MixedInAdditionalPropertiesFalse | ||
#+ FC.optional "bar" bar Bar.barSchema | ||
#+ FC.optional "foo" foo Foo.fooSchema |
17 changes: 17 additions & 0 deletions
17
...eece-openapi3/examples/test-cases/TestCases/Types/MixedInAdditionalPropertiesFalse/Bar.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,17 @@ | ||
{-# LANGUAGE NoImplicitPrelude #-} | ||
|
||
module TestCases.Types.MixedInAdditionalPropertiesFalse.Bar | ||
( Bar(..) | ||
, barSchema | ||
) where | ||
|
||
import qualified Data.Text as T | ||
import qualified Fleece.Core as FC | ||
import Prelude (Eq, Show) | ||
|
||
newtype Bar = Bar T.Text | ||
deriving (Show, Eq) | ||
|
||
barSchema :: FC.Fleece schema => schema Bar | ||
barSchema = | ||
FC.coerceSchema FC.text |
17 changes: 17 additions & 0 deletions
17
...eece-openapi3/examples/test-cases/TestCases/Types/MixedInAdditionalPropertiesFalse/Foo.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,17 @@ | ||
{-# LANGUAGE NoImplicitPrelude #-} | ||
|
||
module TestCases.Types.MixedInAdditionalPropertiesFalse.Foo | ||
( Foo(..) | ||
, fooSchema | ||
) where | ||
|
||
import qualified Data.Text as T | ||
import qualified Fleece.Core as FC | ||
import Prelude (Eq, Show) | ||
|
||
newtype Foo = Foo T.Text | ||
deriving (Show, Eq) | ||
|
||
fooSchema :: FC.Fleece schema => schema Foo | ||
fooSchema = | ||
FC.coerceSchema FC.text |
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
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
Oops, something went wrong.