git.iko.soy/typeable/swagger2
on master help sign in
Remove useReferences from SchemaOptions
900515bNickolay Kudasov
src/Data/Swagger/SchemaOptions.hs−18
@@ -11,22 +11,6 @@ data SchemaOptions = SchemaOptions
11 -- | If @'True'@ the constructors of a datatype, with all nullary constructors,
11 -- | If @'True'@ the constructors of a datatype, with all nullary constructors,
12 -- will be encoded to a string enumeration schema with the constructor tags as possible values.
12 -- will be encoded to a string enumeration schema with the constructor tags as possible values.
13 , allNullaryToStringTag :: Bool
13 , allNullaryToStringTag :: Bool
14− -- | If @'True'@ direct subschemas will be referenced if possible (rather than inlined).
15− -- Note that this option does not influence nested schemas, e.g. for these types
16− --
17− -- @
18− -- data Object = Object String deriving Generic
19− -- instance ToSchema Object
20− --
21− -- newtype Objects = Objects [Object] deriving Generic
22− -- instance ToSchema Objects where
23− -- toNamedSchema = genericToNamedSchema defaultSchemaOptions
24− -- { useReferences = False }
25− -- @
26− --
27− -- Schema for @Objects@ __will not__ inline @Object@ schema because
28− -- it is nested in a @[]@ schema.
29− , useReferences :: Bool
30 -- | Hide the field name when a record constructor has only one field, like a newtype.
14 -- | Hide the field name when a record constructor has only one field, like a newtype.
31 , unwrapUnaryRecords :: Bool
15 , unwrapUnaryRecords :: Bool
32 }
16 }
@@ -39,7 +23,6 @@ data SchemaOptions = SchemaOptions
39-- , 'constructorTagModifier' = id
23-- , 'constructorTagModifier' = id
40-- , 'datatypeNameModifier' = id
24-- , 'datatypeNameModifier' = id
41-- , 'allNullaryToStringTag' = True
25-- , 'allNullaryToStringTag' = True
42−-- , 'useReferences' = True
43-- , 'unwrapUnaryRecords' = False
26-- , 'unwrapUnaryRecords' = False
44-- }
27-- }
45-- @
28-- @
@@ -49,7 +32,6 @@ defaultSchemaOptions = SchemaOptions
49 , constructorTagModifier = id
32 , constructorTagModifier = id
50 , datatypeNameModifier = id
33 , datatypeNameModifier = id
51 , allNullaryToStringTag = True
34 , allNullaryToStringTag = True
52− , useReferences = True
53 , unwrapUnaryRecords = False
35 , unwrapUnaryRecords = False
54 }
36 }
55
37