add string?-typed fields
This commit is contained in:
@@ -100,11 +100,18 @@ schemaForm schema =
|
||||
fmap mergeJson . sequence $
|
||||
case schema.type_ of
|
||||
Object properties ->
|
||||
( \(AK.fromString -> k, "string") ->
|
||||
A.Object . AM.singleton k
|
||||
<$> ( F.mapValues (getO k) (setO k) $
|
||||
jsonString (AK.toString k)
|
||||
)
|
||||
( \(AK.fromString -> k, v) ->
|
||||
case v of
|
||||
"string" ->
|
||||
A.Object . AM.singleton k
|
||||
<$> ( F.mapValues (getO k) (setO k) $
|
||||
jsonString (AK.toString k)
|
||||
)
|
||||
"string?" ->
|
||||
A.Object . AM.singleton k
|
||||
<$> ( F.mapValues (getO k) (setO k) $
|
||||
jsonString (AK.toString k)
|
||||
)
|
||||
)
|
||||
<$> (M.toList properties)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user