Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
148
Issues
148
List
Board
Labels
Milestones
Merge Requests
10
Merge Requests
10
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
haskell-gargantext
Commits
f2d77805
Unverified
Commit
f2d77805
authored
Oct 01, 2018
by
Nicolas Pouillard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[REST] fix arbitrary instances for node users
parent
0f3ee316
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
Node.hs
src/Gargantext/Database/Types/Node.hs
+4
-4
No files found.
src/Gargantext/Database/Types/Node.hs
View file @
f2d77805
...
@@ -20,7 +20,7 @@ Portability : POSIX
...
@@ -20,7 +20,7 @@ Portability : POSIX
module
Gargantext.Database.Types.Node
where
module
Gargantext.Database.Types.Node
where
import
Prelude
(
Enum
,
Bounded
,
minBound
,
maxBound
)
import
Prelude
(
Enum
,
Bounded
,
minBound
,
maxBound
,
mempty
)
import
GHC.Generics
(
Generic
)
import
GHC.Generics
(
Generic
)
...
@@ -311,11 +311,11 @@ $(deriveJSON (unPrefix "node_") ''NodePoly)
...
@@ -311,11 +311,11 @@ $(deriveJSON (unPrefix "node_") ''NodePoly)
instance
Arbitrary
(
NodePoly
NodeId
NodeTypeId
(
Maybe
NodeUserId
)
NodeParentId
NodeName
UTCTime
Value
)
where
instance
Arbitrary
(
NodePoly
NodeId
NodeTypeId
(
Maybe
NodeUserId
)
NodeParentId
NodeName
UTCTime
Value
)
where
arbitrary
=
elements
[
Node
1
1
(
Just
1
)
1
"name"
(
jour
2018
01
01
)
(
toJSON
(
"{}"
::
Text
)
)]
arbitrary
=
elements
[
Node
1
1
(
Just
1
)
1
"name"
(
jour
2018
01
01
)
(
Object
mempty
)]
instance
Arbitrary
(
NodePoly
NodeId
NodeTypeId
NodeUserId
(
Maybe
NodeParentId
)
NodeName
UTCTime
Value
)
where
instance
Arbitrary
(
NodePoly
NodeId
NodeTypeId
NodeUserId
(
Maybe
NodeParentId
)
NodeName
UTCTime
Value
)
where
arbitrary
=
elements
[
Node
1
1
1
(
Just
1
)
"name"
(
jour
2018
01
01
)
(
toJSON
(
"{}"
::
Text
)
)]
arbitrary
=
elements
[
Node
1
1
1
(
Just
1
)
"name"
(
jour
2018
01
01
)
(
Object
mempty
)]
instance
Arbitrary
(
NodePoly
NodeId
NodeTypeId
(
Maybe
NodeUserId
)
NodeParentId
NodeName
UTCTime
HyperdataDocument
)
where
instance
Arbitrary
(
NodePoly
NodeId
NodeTypeId
(
Maybe
NodeUserId
)
NodeParentId
NodeName
UTCTime
HyperdataDocument
)
where
arbitrary
=
elements
[
Node
1
1
(
Just
1
)
1
"name"
(
jour
2018
01
01
)
((
hyperdataDocument
))]
arbitrary
=
elements
[
Node
1
1
(
Just
1
)
1
"name"
(
jour
2018
01
01
)
((
hyperdataDocument
))]
...
@@ -347,7 +347,7 @@ instance ToSchema HyperdataDocument where
...
@@ -347,7 +347,7 @@ instance ToSchema HyperdataDocument where
instance
ToSchema
Value
where
instance
ToSchema
Value
where
declareNamedSchema
proxy
=
genericDeclareNamedSchemaUnrestricted
defaultSchemaOptions
proxy
declareNamedSchema
proxy
=
genericDeclareNamedSchemaUnrestricted
defaultSchemaOptions
proxy
L
.&
mapped
.
schema
.
description
?~
"a document"
L
.&
mapped
.
schema
.
description
?~
"a document"
L
.&
mapped
.
schema
.
example
?~
toJSON
(
""
::
Text
)
L
.&
mapped
.
schema
.
example
?~
toJSON
(
""
::
Text
)
-- TODO
instance
ToSchema
(
NodePoly
NodeId
NodeTypeId
NodeUserId
instance
ToSchema
(
NodePoly
NodeId
NodeTypeId
NodeUserId
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment